]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1450519: remove unauthorized access to library setting history
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 6 Aug 2021 15:35:49 +0000 (11:35 -0400)
committerJason Stephenson <jason@sigio.com>
Thu, 12 Aug 2021 18:21:34 +0000 (14:21 -0400)
commit6a45667681bdc018b053567a01c43520a41ad79a
treef296558d8247ad0606bcff31d5a3257a798a7e97
parent18a3f2aeddf8d32fa7b4cc73c9a37d7cb2134a07
LP#1450519: remove unauthorized access to library setting history

This patch changes the current Library Settings editor so that
it doesn't display the setting history for a setting that the user
doesn't have the underlying view permission for. It also removes
the coustl IDL class [config.org_unit_setting_type_log] from PCRUD.

Access to the setting history is now done through a new method,
open-ils.actor.org_unit.settings.history.visible.retrieve, which
accepts an authtoken and a setting name. If the user has the
relevant view permission, setting history entries at all of the
OUs that they have the permission at are returned. If the user
lacks the permission, an empty array is returned. If the setting
has no permission associated with it, all history entries for
the setting are returned. The user must have at least STAFF_LOGIN
to retrieve any entries at all.

To test
-------
[1] As an administrator, make some changes to the values of
    a privileged library setting (such as one of the credit card
    ones) and an unprivileged one (e.g., lib.info_url).
[2] Log in as a staff user without administration privileges
    and go to the library settings editor. Note that while the
    current value of privileged settings are not displayed, clicking
    on the history link displays the full history of the setting.
[3] Apply the patch and repeat step 2.
[4] This time, history for the privileged setting is not displayed,
    while history for an unprivileged setting continues to be
    available.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Shula Link <slink@gchrl.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/xul/staff_client/server/admin/org_unit_settings.js