LP#1920815 Item edit link displayed for all users user/dbriem/lp1920815_item_edit_link_if_perm
authorDan Briem <dbriem@wlsmail.org>
Thu, 1 Apr 2021 13:38:41 +0000 (09:38 -0400)
committerDan Briem <dbriem@wlsmail.org>
Thu, 1 Apr 2021 13:38:41 +0000 (09:38 -0400)
commitd7509f98d89331583cd038bfe6fce643c1cac49b
tree7f47a92265fb41e7bee2924372cfd46d9fec3434
parent6d5c936d951fac1dfecc09e513682f2c6e5eaa3b
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>
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.ts