[Koha-bugs] [Bug 30624] Add a permission to control the ability to change the logged in library

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 27 21:41:53 CEST 2022


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA
           Keywords|                            |release-notes-needed

--- Comment #28 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
There are several remaining issues here :(

1) Database update

The database update takes care of adding the permission, but it doesn't take
care to update the existing staff accounts. With this patch as is people would
loose the ability to change libraries on update which would be a major behavior
change.

As you remove IndependentBranches checks, we should factor this in as well. I
guess if IndependentBranches is used, don't update non-superlibrarians. If it
isn't used, update non-superlibrarians with the new permission.

2) Unit test

The change to Auth.pm requires a unit test

3) The permission check in Auth.pm doesn't look quite right... maybe instead of
$flags->{superlibrarian} $patron->is_superlibrarian should be used? 

4) Why do you remove the check in
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt in auth.tt without replacing it
with a permission check?

5) Permission

I am not sure the permission is a good fit for the "Administration" module. So
far, we use this for access to the different parts of the administration start
page only. It feels more at the same level as staff_access maybe?

6) Login page staff

The page still offers the library pull down, as of course, the permissions can
be different by user. But maybe we should give a warning if someone who can't
do so tries to log in with another library? (non-blocker)

7) Translatability

I believe this construct is problematic or all TT variables would show up in
translations:

+[% SET page_title = "" %]
+[% IF ( CAN_user_parameters_select_loggedin_library ) %]
+    [% IF Koha.Preference('UseCirculationDesks') %]
+        [% page_title = "Set library and desk" %]
+    [% ELSE %]
+        [% page_title = "Set library" %]
+    [% END %]
+[% ELSE %]
+    [% IF Koha.Preference('UseCirculationDesks') %]
+        [% page_title = "Set desk"%]
+    [% END %]
+[% END %]

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


More information about the Koha-bugs mailing list