dspace-angular
dspace-angular copied to clipboard
Edit authorizations page (& other item edit pages) not hidden/redirect for anon or non-authorised users
Describe the bug The item page edit authorizations ({item-page}/edit/authorizations) loads for anon users and users that don't have edit permission on an item. Example: https://demo.dspace.org/entities/publication/27ed7c48-f460-4deb-a8b5-f6e442fbe2d4/edit/authorizations
Anon / Unauthorised user can't read current RP or add new ones (because no results for users/groups search) though, so page not functional / provides no hidden info for them.
Idem for make private page ({item-page}/edit/private), eg: https://demo.dspace.org/entities/publication/27ed7c48-f460-4deb-a8b5-f6e442fbe2d4/edit/private
Idem for item move page ({item-page}/edit/move), eg: https://demo.dspace.org/entities/publication/27ed7c48-f460-4deb-a8b5-f6e442fbe2d4/edit/move
Idem for item delete page ({item-page}/edit/delete), eg: https://demo.dspace.org/entities/publication/27ed7c48-f460-4deb-a8b5-f6e442fbe2d4/edit/delete
To Reproduce Steps to reproduce the behavior:
- As anonymous / non logged in user, go to a {item-page}/edit/authorizations page
- Verify this shows empty list of RP for the item (& its bundles) Idem for logged in user that does not have edit rights on that item.
Idem for make private page ({item-page}/edit/private) Idem for item move page ({item-page}/edit/move) Idem for item delete page ({item-page}/edit/delete)
Expected behavior
- For anon should redirect to login page
- For user without item edit rights => should show forbidden page
This looks like the same issue with missing guards as https://github.com/DSpace/dspace-angular/issues/2609.
Agreed with @alanorth that this seems very similar to / related to #2609 which was fixed by 4Science in #2632. @atarix83 would 4Science be interested in claiming this one as well? It seems to require fixes very similar to what was done in #2632.
@tdonohue we can work on this