In circ-toolbar.inc: <!-- TMPL_IF NAME="StaffMember" --> <!-- TMPL_IF NAME="CAN_user_staffaccess" --> new YAHOO.widget.Button("changepassword"); <!-- /TMPL_IF--> <!-- TMPL_ELSE--> new YAHOO.widget.Button("changepassword"); <!-- /TMPL_IF --> Besides being pointless, this refers to a "StaffMember" variable which is only defined in one place, moremember.pl, based only on the patron category. A remnant of a time before granular permissions?
Created attachment 3474 [details] [review] Proposed fix
This bug is mentioned in: Fix for Bug 5974 - Bogus auth check for "StaffMember" role http://lists.koha-community.org/pipermail/koha-patches/2011-March/014287.html
Created attachment 4590 [details] [review] Fix for Bug 5974 - Bogus auth check for "StaffMember" role Also removing some YAHOO.widget.Button declarations which are redundant.
Created attachment 6176 [details] [review] Fix for Bug 5974 - Bogus auth check for "StaffMember" role Also removing some YAHOO.widget.Button declarations which are redundant. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Template only change, simplifies template logic and removes check for bogus value. Marking as Passed QA
patch pushed, please test
Created attachment 6408 [details] [review] follow up for trailing "
*** Bug 7269 has been marked as a duplicate of this bug. ***
Created attachment 6431 [details] [review] Bug 5974: Fix broken toolbar on paton checkout tab Fixed a couple of errors: - [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %] - added missing [% END %] - added missing line new YAHOO.widget.Button("duplicate"); To test: 1) Open patron account 2) Go through tabs, especially 'Check out' 3) Check toolbars are correct and buttons work
Created attachment 6433 [details] [review] Bug 5974: Fix broken toolbar on paton checkout tab Fixed a couple of errors: - [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %] - added missing [% END %] - added missing line new YAHOO.widget.Button("duplicate"); To test: 1) Open patron account 2) Go through tabs, especially 'Check out' 3) Check toolbars are correct and buttons work
Created attachment 6434 [details] [review] Bug 5974: Fix broken toolbar on paton checkout tab Fixed a couple of errors: - [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %] - added missing [% END %] - added missing line new YAHOO.widget.Button("duplicate"); To test: 1) Open patron account 2) Go through tabs, especially 'Check out' 3) Check toolbars are correct and buttons work
Created attachment 6465 [details] [review] Bug 5974: Fix broken toolbar on paton checkout tab Fixed a couple of errors: - [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %] - added missing [% END %] - added missing line new YAHOO.widget.Button("duplicate"); To test: 1) Open patron account 2) Go through tabs, especially 'Check out' 3) Check toolbars are correct and buttons work Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Template only change, easy to read, marking as Passed QA
follow-up pushed, please test
Tested succesfully on master, waiting to close until the patch has made it into 3.6.
This patch does not apply cleanly to the 3.6.x branch. If it should, please rebase over that branch and attache a corrected patch to this bug report. cnighs@erasmus:~/koha.3.2.test (3.6.x)$ git cherry-pick -x -s 9cecb7a9d30dfe Automatic cherry-pick failed. After resolving the conflicts, mark the corrected paths with 'git add <paths>' or 'git rm <paths>' and commit the result with: git commit -c 9cecb7a9d30dfeb2c39789b7493d20734647b9b6 cnighs@erasmus:~/koha.3.2.test (3.6.x *+)$ git status # On branch 3.6.x # Your branch is ahead of 'origin/3.6.x' by 9 commits. # # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) # (use "git add/rm <file>..." as appropriate to mark resolution) # # both modified: koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
Created attachment 6554 [details] [review] [3.6.x] Patch - includes all 3 previous patches for master All 3 patches applied without conflicts, I squashed them and checked the toolbars. No problems spotted. Perhaps another set of eyes checking would still be good.
Created attachment 6625 [details] [review] Fix for Bug 5974 - Bogus auth check for "StaffMember" role Also removing some YAHOO.widget.Button declarations which are redundant. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> follow-up: trailing " that makes T::T fail http://bugs.koha-community.org/show_bug.cgi?id=5974 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Bug 5974: Fix broken toolbar on paton checkout tab Fixed a couple of errors: - [% CAN_user_staffaccess %] should be [% IF ( CAN_user_staffaccess ) %] - added missing [% END %] - added missing line new YAHOO.widget.Button("duplicate"); To test: 1) Open patron account 2) Go through tabs, especially 'Check out' 3) Check toolbars are correct and buttons work Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This has already been pushed, for master, the patch here is for 3.6.x and applies cleanly there
Patch pushed to 3.6.x.
This makes it so that the "set password" button is now hidden from users that do not have can_user_staffaccess - I don't think this makes sense - a user with edit borrowers permission can change the password from "edit patron," so why, for the button, do we need staffaccess? I think we perhaps assigned the wrong permission level to this button?