https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31389 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139326|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 139398 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139398&action=edit Bug 31389: Calculate user permissions in separate function This patch refactors the setting of user permissions for templates into a new function, which can be easily unit tested and reduces the amount of code in C4::Auth::get_template_and_user(). It also aids in the re-usability of permission checking code. Test plan: 0) Apply patch and koha-plack --restart kohadev 1) prove t/Koha/Auth/Permissions.t 2) As koha superlibrarian, go to http://localhost:8081/cgi-bin/koha/tools/tools-home.pl 3) Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl 4) Create new test user with "Staff access..." and "Remaining circulation permissions" 5) Logout of koha superlibrarian 6) Login as test user 7) Note you can only see a limited view of the staff interface (i.e. no administration, no tools, no reports, etc.) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.