[Koha-bugs] [Bug 32968] Create granular permissions for ERM

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 28 09:31:45 CET 2023


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

--- Comment #7 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Yes, this looks good to me.

One suggestion is to move the "OR" logic in the template

Pass permission.agreement = permissions.admin || permissions.agreement ? 1 : 0
And simply test permission.agreement later

you could also have 
+                                            permissions.admin ||
+                                            permissions.agreement ||
+                                            permissions.show
in show_agreement?

Or...

... generate a hash like (pseudo-code):

{
  agreement => 
    {
      read  => { permissions.admin || permissions.agreement || permissions.show
}
      write => { permissions.admin || permissions.agreement }
    }
}


Then simply test for agreement.read and agreement.write?

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


More information about the Koha-bugs mailing list