LP#1920815 Item edit link displayed for all users user/mmorgan/lp1920815_signoff
authorDan Briem <dbriem@wlsmail.org>
Thu, 1 Apr 2021 13:38:41 +0000 (09:38 -0400)
committerMichele Morgan <mmorgan@noblenet.org>
Thu, 1 Apr 2021 16:21:25 +0000 (16:21 +0000)
commit2bfd74ee7645a7336e454fda139ce20a70460ab1
treebc7ee7b6f9fa9bbf02bcb76bbe101619fc94177c
parent6b8adca643117afe971eb067d125b20ace276e5d
LP#1920815 Item edit link displayed for all users

The Angular catalog item table doesn't check UPDATE_COPY perm
before displaying an edit link. The back-end checks, so this is
a display issue only. This commit grabs a list of org Ids where
the user has UPDATE_COPY perm and checks the copy circ lib or
cn owning lib is in the list before displaying the edit link.

To test:
1. Search for a record with items you don't have perm to edit
2. Note the edit link shows on every item
3. Apply patch
4. Repeat steps 1-2
5. Note edit link displays if you have perm to edit

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts