[ENG-9050] Only admins and moderators and access moderation-related endpoints #11343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Any user can access moderation pages regardless of his permission, however only moderators and admins should be able to do it
Changes
Adjusted
MustBeModeratorpermission that controls access to moderation pages (collections, preprints, registrations)Adjusted
ContributorOrModeratorpermission that controls viewing registration actions (only moderators and admins can do that)QA Notes
Would be nice if QA team tests all endpoints manually and separately. The reason is that I manually opened appropriate pages to check what requests are made on these pages. All of them had
MustBeModeratorpermission.Notes
CollectionProviderActionListview is not used anywhere, so can be removed in the futureCollectionProviderSubmissionList,PreprintProviderPreprintList,RegistrationProviderSubmissionList- have custom permissions where usual user has access to specific data (like you are either admin or object is public/published). I assume this kind of data is displayed somewhere else for ordinary users, so they weren't covered with testsTicket
https://openscience.atlassian.net/browse/ENG-9050?atlOrigin=eyJpIjoiYmVhNDBlOTA2OTBmNDE4MWFhNTgzN2I5ZTc3ZmExYWIiLCJwIjoiaiJ9