From 527b4c66e11f821863ac93140fbd12c90961059c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 25 Apr 2016 10:23:58 -0400 Subject: [PATCH] Bug 16231 [Follow-up] Correct permission handling in subscription edit menu This follow-up allows for the case where the user has only "delete_subscription" permission. The delete option might be available even if the template's "cannotedit" variable is true. To test, apply the patch and revise a staff user's permission to have only the "delete_subscription" permission under Serials. Log in as that users and locate a subscription and view the details for that subscription. You should see a toolbar on that page containing only a "Delete" button. Repeat the steps above, adding serials permission to the user one by one, confirming that the toolbar continues to show the correct options. Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc index b79dd45..5722b21 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc @@ -46,7 +46,11 @@ [% END %] [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %] - [% UNLESS ( cannotedit ) %] + [% IF ( cannotedit ) %] + [% IF ( CAN_user_serials_delete_subscription ) %] + + [% END %] + [% ELSE %]