Skip to content

Commit

Permalink
fix rights behaviour with the back
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent Mariotti committed Dec 12, 2024
1 parent 91f65dc commit 58737aa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ public void getBoardResourceIds(HttpServerRequest request) {
});
}

@Post("/board/:boardId/notify")
@Post("/board/:id/notify")
@ApiDoc("Notify board shared users")
@ResourceFilter(ManageBoardRight.class)
@SecuredAction(value = "", type = ActionType.RESOURCE)
public void notifyBoardUsers(HttpServerRequest request) {
UserUtils.getUserInfos(eb, request, user -> {
String boardId = request.getParam(Field.BOARDID);
String boardId = request.getParam(Field.ID);
boardService.getBoardSharedUsers(boardId)
.onSuccess(board -> {
JsonObject params = new JsonObject();
Expand All @@ -325,6 +325,7 @@ public void notifyBoardUsers(HttpServerRequest request) {
.collect(Collectors.toList());

notification.notifyTimeline(request, "magneto.notify_board", user, userIdsList, params);
request.response().setStatusMessage(boardId).setStatusCode(200).end();
})
.onFailure(fail -> {
String message = String.format("[Magneto@%s::notifyBoardUsers] Failed to notify users of board : %s",
Expand Down

0 comments on commit 58737aa

Please sign in to comment.