Summary: | Adding an edit_authorities subpermission for editauthorities | ||
---|---|---|---|
Product: | Koha | Reporter: | Wainui Witika-Park <wainuiwitikapark> |
Component: | Staff interface | Assignee: | Wainui Witika-Park <wainuiwitikapark> |
Status: | Patch doesn't apply --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | aleisha, angela.berrett, david, gmcharlt, lucas, susan.merner |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27319 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31197 |
||
GIT URL: | Change sponsored?: | Sponsored | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This enhancement adds a new sub permission for authority records - edit_authorities. This will enable the adding of more granular permissions in future bugs, such as deleting and editing authority records.
Sponsored by: Education Services Australia SCIS
|
|
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 35871 | ||
Attachments: |
Bug 35870: Adding new subpermission edit_authorities
Bug 35870: Adding new subpermission edit_authorities Bug 35870: Adding new subpermission edit_authorities Bug 35870: Adding new subpermission edit_authorities Bug 35870: Add new subpermission edit_authorities Bug 35870: Add new subpermission edit_authorities |
Description
Wainui Witika-Park
2024-01-23 02:26:26 UTC
Created attachment 161264 [details] [review] Bug 35870: Adding new subpermission edit_authorities Sponsored-by: Education Services Australia SCIS Created attachment 161317 [details] [review] Bug 35870: Adding new subpermission edit_authorities Test plan: - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - logout and log back in to the staff client as the new test user - go to Authorities - notice how you cannot add a new authority - logout and log back in to the staff client as your personal user - edit the new test user - add permission editauthorities and subpermission edit_authorities - logout and log back in to the staff client as the test user - go to Authorities - notice how you can now add a new authority - try adding a new authority and make sure you can edit it Sponsored-by: Education Services Australia SCIS The patch no longer applies 8-(... git bz apply 35870 Bug 35870 - Adding an edit_authorities subpermission for editauthorities 161317 - Bug 35870: Adding new subpermission edit_authorities Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35870: Adding new subpermission edit_authorities Using index info to reconstruct a base tree... M authorities/authorities.pl M installer/data/mysql/mandatory/userpermissions.sql M koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc M koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc Auto-merging installer/data/mysql/mandatory/userpermissions.sql Auto-merging authorities/authorities.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 35870: Adding new subpermission edit_authorities Created attachment 177208 [details] [review] Bug 35870: Adding new subpermission edit_authorities Test plan: - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - logout and log back in to the staff client as the new test user - go to Authorities - notice how you cannot add a new authority - logout and log back in to the staff client as your personal user - edit the new test user - add permission editauthorities and subpermission edit_authorities - logout and log back in to the staff client as the test user - go to Authorities - notice how you can now add a new authority - try adding a new authority and make sure you can edit it Sponsored-by: Education Services Australia SCIS (In reply to David Nind from comment #3) > The patch no longer applies 8-(... > > git bz apply 35870 > > Bug 35870 - Adding an edit_authorities subpermission for editauthorities > > 161317 - Bug 35870: Adding new subpermission edit_authorities > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 35870: Adding new subpermission edit_authorities > Using index info to reconstruct a base tree... > M authorities/authorities.pl > M installer/data/mysql/mandatory/userpermissions.sql > M koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc > M koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc > M > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt > M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt > Falling back to patching base and 3-way merge... > Auto-merging > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt > Auto-merging > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt > Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc > Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc > CONFLICT (content): Merge conflict in > koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc > Auto-merging installer/data/mysql/mandatory/userpermissions.sql > Auto-merging authorities/authorities.pl > error: Failed to merge in the changes. > Patch failed at 0001 Bug 35870: Adding new subpermission edit_authorities sorry I missed this, I have submitted a new patch I don't understand the purpose of this patch. We have the "Edit authorities" permission already. What is this adding? (In reply to Owen Leonard from comment #6) > I don't understand the purpose of this patch. We have the "Edit authorities" > permission already. What is this adding? IIRC viewing is also tied to editauthorities, which is why we had to give the permission in the past, although they are not supposed to be edited. I wonder if a "remaining authority permissions" is required here as well, as this is the first sub-permission for this module (thinking of how circulate is set up for example) Users without "Edit authorities" permission have permission to view authorities without any additional permissions required. (In reply to Owen Leonard from comment #6) > I don't understand the purpose of this patch. We have the "Edit authorities" > permission already. What is this adding? See blocked Bug 35871 - it was to allow for other granular submissions like deleting and editing authorities (In reply to Owen Leonard from comment #8) > Users without "Edit authorities" permission have permission to view > authorities without any additional permissions required. Sorry, should have re-tested. The patch still applies, however the database update to add the new permission doesn't work. Created attachment 177488 [details] [review] Bug 35870: Adding new subpermission edit_authorities Test plan: - apply patch - login to staff client with your personal user - make a new test user - set the new test user's permissions to catalogue so they can access the staff client - logout and log back in to the staff client as the new test user - go to Authorities - notice how you cannot add a new authority - logout and log back in to the staff client as your personal user - edit the new test user - add permission editauthorities and subpermission edit_authorities - logout and log back in to the staff client as the test user - go to Authorities - notice how you can now add a new authority - try adding a new authority and make sure you can edit it Sponsored-by: Education Services Australia SCIS Created attachment 177493 [details] [review] Bug 35870: Add new subpermission edit_authorities Add a new sub permission for authority records - this will enbale the adding other granular permssions in future bugs, such as deleting and editing authority records. Test plan: 1. Apply the patch. 2. Update the database. 3. Login to the staff interface as a superlibrarian. 4. Add or edit an existing staff patron. 5. Set the patron's permissions to catalogue so they can access the staff interface. 6. Logout and log back in to the staff interface as the patron. 7. Go to Authorities. 8. Notice how you cannot add a new authority record. 9. Logout and log back in to the staff interface as a superlibrarian. 10. Edit the staff patron - add permission editauthorities and sub permission edit_authorities. 11. Logout and log back in to the staff interface as the staff patron. 12. Go to Authorities. 13. Notice how you can now add a new authority record. 14. Try adding a new authority record and make sure you can edit it. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> (In reply to David Nind from comment #11) > The patch still applies, however the database update to add the new > permission doesn't work. Thanks Aleisha! PS I edited the commit message. Does this resolve the request in Bug 31197? *** Bug 31197 has been marked as a duplicate of this bug. *** Created attachment 178895 [details] [review] Bug 35870: Add new subpermission edit_authorities Add a new sub permission for authority records - this will enbale the adding other granular permssions in future bugs, such as deleting and editing authority records. Test plan: 1. Apply the patch. 2. Update the database. 3. Login to the staff interface as a superlibrarian. 4. Add or edit an existing staff patron. 5. Set the patron's permissions to catalogue so they can access the staff interface. 6. Logout and log back in to the staff interface as the patron. 7. Go to Authorities. 8. Notice how you cannot add a new authority record. 9. Logout and log back in to the staff interface as a superlibrarian. 10. Edit the staff patron - add permission editauthorities and sub permission edit_authorities. 11. Logout and log back in to the staff interface as the staff patron. 12. Go to Authorities. 13. Notice how you can now add a new authority record. 14. Try adding a new authority record and make sure you can edit it. Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind <david@davidnind.com> The patch no longer applies 8-(... git bz apply 35870 Bug 35870 - Adding an edit_authorities subpermission for editauthorities 178895 - Bug 35870: Add new subpermission edit_authorities Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 35870: Add new subpermission edit_authorities Using index info to reconstruct a base tree... M authorities/authorities.pl M installer/data/mysql/mandatory/userpermissions.sql M koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc Auto-merging installer/data/mysql/mandatory/userpermissions.sql Auto-merging authorities/authorities.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 35870: Add new subpermission edit_authorities |