[Koha-bugs] [Bug 15520] Add more granular permission for only editing own library's circ rules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 4 15:07:10 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15520

--- Comment #10 from Josef Moravec <josef.moravec at gmail.com> ---
Comment on attachment 72240
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72240
Bug 15520: Add permission to restrict circ rules editing to own library

Review of attachment 72240:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15520&attachment=72240)
-----------------------------------------------------------------

::: admin/smart-rules.pl
@@ +63,5 @@
> +
> +my $uid = Koha::Patrons->find( $loggedinuser )->userid;
> +my $restricted_to_own_library = $uid && haspermission( $uid, { parameters => 'manage_circ_rules_restricted' }, { no_inherit => 1 } );
> +$template->param( restricted_to_own_library => $restricted_to_own_library );
> +$branch = C4::Context::mybranch() if $restricted_to_own_library;

This is not the logged in user's home library, it is the library where the user
is logged in now - so when user change library, he/she could change another's
library rules!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list