Angular Library Settings Editor view perms check is broken

Bug #2006749 reported by Chris Sharp
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned

Bug Description

Found in PINES production on 3.10.0. When entering the Library Settings Editor as a non-"admin" user, values for any setting with a view permission set will not be shown. Further investigation into the Perl shows that the subroutine call for that is incorrect.

See https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm;h=3c323775ba2003d6c249890ab18421fc4dc1272a;hb=HEAD#l1300

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Chris Sharp (chrissharp123) wrote :

For reference, the Angular Library Settings Editor addresses bug 1839341

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Looks like the call to ou_ancestor_setting_perm_check on line 1321 is a bit wrong.

Here's my attempt at fixing it:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp2006749-fix-apputils-perm-check

Changed in evergreen:
milestone: none → 3.11-beta
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Signed off on Jason's fix and added a subsequent one that works on a PINES test server:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/csharp/lp2006749-fix-apputils-perm-check

tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I pushed a branch with a signoff for Chris's commit to https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp2006749-fix-apputils-perm-check-signoff

(NB: I amended Chris's commit to remove some white space at the end of a line that was part of his change.)

After reviewing this some more, I'm not sure why these functions have ancestor in the name, since they no longer (or never did) do anything with org unit ancestors, neither for the settings nor for the permissions checks. I still have the suspicion that these functions are incomplete, but since I didn't implement the original code I'm not entirely certain what they are meant to do.

I would ask the original author to comment, but I am not certain that Kyle Huckins is still involved in Evergreen development.

tags: added: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

Tested and pushed down to rel_3_10. Thanks, Jason and Chris!

I suspect that the ou_ancestor_setting_perm_check() and ou_ancestor_setting_log() values were named that way to be parallel with ou_ancestor_setting_value(), though there arguably isn't actually that degree of parallelism; certainly not for ..._perm_check()

Changed in evergreen:
milestone: 3.11-beta → 3.10.1
no longer affects: evergreen/3.10
Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.