-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use correct access checks for showing interpretation reply, edit…
… and delete buttons (#1531) Implements DHIS2-15510 These are the access checks that are done in the backend: * edit or delete an interpretation: isCreatorOrSuperuser of interpretation * add interpretation comment: interpretation.access.write * update comment: isCreatorOrSuperuser of comment * delete comment: isCreatorOrSuperuser of comment && interpretation.access.write Other changes: * use createdBy instead of user. `user` is only kept for backwards compatibility * don't fetch comment.access because the values can be wrong, and it's not needed anyway * add error handling to the CommentDeleteButton * error message for edit-comment-failure is made generic. Backend may report a misleading message such as "interpretation does not exist" when it does in fact exist, and user can see it, but user doesn't have access to edit.
- Loading branch information
1 parent
0fa8310
commit bf70361
Showing
12 changed files
with
383 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.