dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Edit authorizations page (& other item edit pages) not hidden/redirect for anon or non-authorised users

Open MarieVerdonck opened this issue 1 year ago • 3 comments

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:

  1. As anonymous / non logged in user, go to a {item-page}/edit/authorizations page
  2. 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

MarieVerdonck avatar Jan 04 '24 10:01 MarieVerdonck

This looks like the same issue with missing guards as https://github.com/DSpace/dspace-angular/issues/2609.

alanorth avatar Jan 05 '24 19:01 alanorth

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 avatar Jan 08 '24 15:01 tdonohue

@tdonohue we can work on this

artlowel avatar Apr 24 '24 11:04 artlowel