Bugzilla – Attachment 6625 Details for
Bug 5974
Bogus auth check for "StaffMember" role
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for Bug 5974 - Bogus auth check for "StaffMember" role
Fix-for-Bug-5974---Bogus-auth-check-for-StaffMembe.patch (text/plain), 7.65 KB, created by
Chris Cormack
on 2011-12-06 22:46:40 UTC
(
hide
)
Description:
Fix for Bug 5974 - Bogus auth check for "StaffMember" role
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-12-06 22:46:40 UTC
Size:
7.65 KB
patch
obsolete
>From e11fd88ca98a54996b763b27eb434de8d53b3e44 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 28 Mar 2011 14:08:00 -0400 >Subject: [PATCH] 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> >--- > .../prog/en/includes/circ-toolbar.inc | 34 +++++--------------- > .../prog/en/includes/members-toolbar.inc | 8 +--- > 2 files changed, 10 insertions(+), 32 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >index 503f954..913076f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc >@@ -63,13 +63,9 @@ function update_child() { > > var moremenu = [ > { text: _("Renew Patron"), onclick: { fn: confirm_reregistration } }, >- { text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]" >- [% IF ( CAN_user_permissions ) %][% IF ( StaffMember ) %] >- [% UNLESS ( CAN_user_staffaccess ) %], disabled: true[% END %] >- [% ELSE %][% END %] >- [% ELSE %], disabled: true[% END %]}, >- { text: _("Delete"), [% IF ( StaffMember ) %][% UNLESS ( CAN_user_staffaccess ) %]disabled: true, [% END %][% ELSE %][% UNLESS ( CAN_user_borrowers ) %]disabled: true, [% END %][% END %] onclick: { fn: confirm_deletion } }, >- { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS ( is_child ) %], disabled: true[% END %]} >+ { text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]}, >+ { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } }, >+ { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS is_child %], disabled: true[% END %]} > ]; > > new YAHOO.widget.Button({ >@@ -97,23 +93,10 @@ function update_child() { > [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %] > new YAHOO.widget.Button("editpatron"); > new YAHOO.widget.Button("addnote"); >- [% IF ( StaffMember ) %][% IF ( CAN_user_staffaccess ) %] new YAHOO.widget.Button("changepassword"); [% END %] >- [% ELSE %] new YAHOO.widget.Button("changepassword"); [% END %] >+ [% IF CAN_user_staffaccess %] new YAHOO.widget.Button("changepassword"); [% END %] > new YAHOO.widget.Button("duplicate"); > new YAHOO.widget.Button("printslip"); > new YAHOO.widget.Button("printpage"); >- new YAHOO.widget.Button("renewpatron"); >- [% IF ( CAN_user_permissions ) %] >- [% IF ( StaffMember ) %] >- [% IF ( CAN_user_staffaccess ) %] >- new YAHOO.widget.Button("patronflags"); >- [% END %] >- [% ELSE %] >- new YAHOO.widget.Button("patronflags"); >- [% END %] >- [% END %] >- [% IF ( StaffMember ) %][% UNLESS ( CAN_user_staffaccess ) %]new YAHOO.widget.Button("deletepatron");[% END %] >- [% ELSE %]new YAHOO.widget.Button("deletepatron");[% END %] > } > > //]]> >@@ -135,11 +118,10 @@ function update_child() { > [% END %] > [% END %] > [% IF ( CAN_user_borrowers ) %] >- [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %] >-[% IF ( StaffMember ) %][% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %] >- [% ELSE %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %] >- [% END %] >- <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li> >+ [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %] >+ [% IF ( CAN_user_staffaccess ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li>[% END %] >+ [% END %] >+ <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li> > <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=page">Print Page</a></li> > <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=slip">Print Slip</a></li> > <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index afad863..bc3e920 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -91,14 +91,10 @@ function update_child() { > [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %] > new YAHOO.widget.Button("editpatron"); > new YAHOO.widget.Button("addnote"); >- new YAHOO.widget.Button("changepassword"); >+ [% IF CAN_user_staffaccess %]new YAHOO.widget.Button("changepassword"); [% END %] > new YAHOO.widget.Button("duplicate"); > new YAHOO.widget.Button("printslip"); > new YAHOO.widget.Button("printpage"); >- new YAHOO.widget.Button("renewpatron"); >- new YAHOO.widget.Button("patronflags"); >- new YAHOO.widget.Button("deletepatron"); >- new YAHOO.widget.Button("updatechild"); > } > > //]]> >@@ -119,7 +115,7 @@ function update_child() { > [% END %] > [% END %] > [% IF ( adultborrower ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&guarantorid=[% borrowernumber %]&category_type=C">Add child</a></li>[% END %] >- <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li> >+ [% IF CAN_user_staffaccess %]<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change Password</a></li> [% END %] > <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&borrowernumber=[% borrowernumber %]&category_type=[% category_type %]">Duplicate</a></li> > <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=page">Print Page</a></li> > <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&print=slip">Print Slip</a></li> >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5974
:
3474
|
4590
|
6176
|
6408
|
6431
|
6433
|
6434
|
6465
|
6554
| 6625