From 92e89f48f49907bcaf726f932598d90047cdee23 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 2 Dec 2007 03:56:45 -0600 Subject: [PATCH] disable actions in moremember based on staff_access permission Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 1 + .../prog/en/includes/members-toolbar.inc | 17 ++++++++++------- members/moremember.pl | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e89a0b52e5..f6bf595219 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -178,6 +178,7 @@ sub get_template_and_user { $template->param( CAN_user_editauthorities => 1 ); $template->param( CAN_user_serials => 1 ); $template->param( CAN_user_reports => 1 ); + $template->param( CAN_user_staffaccess => 1 ); } if ( $flags && $flags->{circulate} == 1 ) { 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 d5473d13b9..09175ad270 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -40,8 +40,8 @@ function confirm_reregistration() { var moremenu = [ { text: "Renew Patron", onclick: { fn: confirm_reregistration } }, - { text: "Set Permissions", url: "/cgi-bin/koha/members/member-flags.pl?member=",disabled: true, }, - { text: "Delete", onclick: { fn: confirm_deletion } }, + { text: "Set Permissions", url: "/cgi-bin/koha/members/member-flags.pl?member=",disabled: true, disabled: true, }, + { text: "Delete", disabled: true, onclick: { fn: confirm_deletion } }, ] new YAHOO.widget.Button({ @@ -64,11 +64,12 @@ function confirm_reregistration() { new YAHOO.widget.Button("addchild"); new YAHOO.widget.Button("editpatron"); new YAHOO.widget.Button("addnote"); - new YAHOO.widget.Button("changepassword"); - new YAHOO.widget.Button("printslilp"); + new YAHOO.widget.Button("changepassword"); + new YAHOO.widget.Button("changepassword"); + new YAHOO.widget.Button("printslip"); new YAHOO.widget.Button("printpage"); new YAHOO.widget.Button("renewpatron"); - new YAHOO.widget.Button("patronflags"); + new YAHOO.widget.Button("patronflags"); new YAHOO.widget.Button("patronflags"); new YAHOO.widget.Button("deletepatron"); } @@ -91,8 +92,10 @@ function confirm_reregistration() { ">Add Note --> -
  • ">Change Password
  • +
  • ">Change Password
  • &print=page">Print Page
  • &print=slip">Print Slip
  • -
  • ">Renew Account
  • ">Set Permissions
  • Delete
  • +
  • ">Renew Account
  • +
  • ">Set Permissions
  • ">Set Permissions
  • +
  • Delete
  • Delete
  • diff --git a/members/moremember.pl b/members/moremember.pl index 381f996dbe..3596522a92 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -312,7 +312,8 @@ $template->param( unvalidlibrarian => $unvalidlibrarian, error => $error, $error => 1, - # reserveloop => \@reservedata, + StaffMember => ($category_type eq 'S'), + # reserveloop => \@reservedata, ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5