Bugzilla – Attachment 67440 Details for
Bug 19323
Subscription edit permission issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19323: subscription edit permission issue
Bug-19323-subscription-edit-permission-issue.patch (text/plain), 1.74 KB, created by
Kyle M Hall (khall)
on 2017-09-29 12:00:04 UTC
(
hide
)
Description:
Bug 19323: subscription edit permission issue
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-09-29 12:00:04 UTC
Size:
1.74 KB
patch
obsolete
>From 9c75e88ceaab0c6c8c775852b6b2b5de96eb21b6 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 15 Sep 2017 11:12:01 +0200 >Subject: [PATCH] Bug 19323: subscription edit permission issue > >If a librarian has edit_subscription but not create_subscription : >When trying to edit a subscription, after saving permission is denied. > >This is because permissions in serials/subscription-add.pl depends on arg 'op' and on edit this arg starts with 'modify' but changes to 'modsubscription' when saving. > >Test plan : >- Create a user with staff access >- Define its permissions on serials : only edit_subscription >- Edit a subscription >- Click 'Next' >- Click 'Test prediction pattern' >- Click 'Save subscription' >=> Without patch you get to page serials/subscription-add.pl with permission denied >=> With patch subscription is saved and you get to subscription details page > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > serials/subscription-add.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 1849ed7..16d397b 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -46,7 +46,8 @@ my $sub_length; > > # Permission needed if it is a modification : edit_subscription > # Permission needed otherwise (nothing or dup) : create_subscription >-my $permission = ($op eq "modify") ? "edit_subscription" : "create_subscription"; >+my $permission = >+ ( $op eq 'modify' || $op eq 'modsubscription' ) ? "edit_subscription" : "create_subscription"; > > my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => "serials/subscription-add.tt", >-- >2.10.2
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 19323
:
67141
|
67153
| 67440