]> git.koha-community.org Git - koha.git/commit
Bug 34589: Only update users if permission is added
authorNick Clemens <nick@bywatersolutions.com>
Tue, 22 Aug 2023 15:09:17 +0000 (15:09 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 18 Sep 2023 08:43:34 +0000 (22:43 -1000)
commit5969d48392ae1b2740ace26b7c9efd3c1ce5b638
treed4570b290f97af25e5719c306249ef6f5b6ddd60
parentb8b21c6d11cc2065a475b36bf1214fd03d7ebe05
Bug 34589: Only update users if permission is added

To test:
1 - Assign a user 'edit_items' permission
2 - Manually run the update
    perl -e 'use C4::Installer; warn Data::Dumper::Dumper(C4::Installer::run_db_rev("installer/data/mysql/db_revs/221200003.pl"));'
3 - Edit patron permissions
4 - Note they now have edit_any_item permission
5 - Remove that permission
6 - Run the update again
7 - Edit patron permissions
8 - They have edit_any_item again - remove it
9 - Apply patch
10 - Run the update
11 - Edit patron permissions
12 - No new permissions added!
13 - sudo koha-mysql kohadev
     DELETE FROM permissions WHERE code = 'edit_any_item'
14 - Run the update again
15 - Edit patron permissions
16 - They do have edit_any_item

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2bdfe69df80d2028563eda175d6f9a0db4d0b19d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/db_revs/221200003.pl