[Bug 13888] 'Lists' permission should allow/disallow using the lists module in staff
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13888 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #13 from Roman Dolny <roman.dolny@jezuici.pl> --- (In reply to Jake Deery from comment #12)
Thanks for looking, Roman. I just tried with a fresh k.t.d, and it didn't work initially. After I ran updatedatabase, it worked fine.
Can I ask you kindly to try again, making sure all the atomicupdates have run?
I've tried again, but had the same effect. I'm not sure doing it weel, so paste listind at the end of this reply. But there is sth interesting in virtualshelves/shelves.pl: # this check is for the create list permission $allow_create_public_lists = haspermission( $loggedinuser, { lists => 'create_public_lists' } ) ? 1 : 0; # we want the user to be able to pick if public or private only if they are allowed $public = ( $query->param('public') == 1 && $allow_create_public_lists == 1 ) ? 1 : 0; haspermission need userid as first argument, but now it is $loggedinuser (second argument returned from get_template_and_user). So $allow_create_public_lists is always 0 and $public too 0. After replacing $loggedinuser by C4::Context->userenv->{id} it works. Listing: kohadev-koha@kohadevbox:koha(main)$ git checkout -b bug_13888 origin/main branch 'bug_13888' set up to track 'origin/main'. Switched to a new branch 'bug_13888' kohadev-koha@kohadevbox:koha(bug_13888)$ git bz apply 13888 Bug 13888 - 'Lists' permission should allow/disallow using the lists module in staff 168385 - Bug 13888: 'Lists' permission should allow/disallow using the lists module in staff 168422 - Bug 13888: Tidy Koha/Virtualshelf.pm Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 13888: 'Lists' permission should allow/disallow using the lists module in staff Applying: Bug 13888: Tidy Koha/Virtualshelf.pm kohadev-koha@kohadevbox:koha(bug_13888)$ perl installer/data/mysql/updatedatabase.pl DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_13888-Add-extra-list-perms.pl [18:05:02]: Bug 13888 - 'Lists' permission should allow/disallow using the lists module in staff Added permission 'use_public_lists' Added permission 'create_public_lists' kohadev-koha@kohadevbox:koha(bug_13888)$ -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org