Bugzilla – Attachment 7595 Details for
Bug 7521
Cannot receive serials without full serials permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7521: Templates should use receive_serials permission
Bug-7521-Templates-should-use-receiveserials-permi.patch (text/plain), 4.21 KB, created by
Jared Camins-Esakov
on 2012-02-12 19:51:20 UTC
(
hide
)
Description:
Bug 7521: Templates should use receive_serials permission
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-02-12 19:51:20 UTC
Size:
4.21 KB
patch
obsolete
>From 056699b4dc74b10f646757f44fa2b94af23c65a6 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Fri, 10 Feb 2012 07:17:33 +0100 >Subject: [PATCH] Bug 7521: Templates should use receive_serials permission >Content-Type: text/plain; charset="UTF-8" > >Corrects templates to use permission receive_serials. > >Before patch: >1) Serial receive page (/cgi-bin/koha/serials/serials-edit.pl...) >can only be accessed with full serials permissions. >When one permission is missing, page can not be accessed. > >2) Serial collection/Issue History page (/cgi-bin/koha/serials/serials-collection.pl...) >can only be accessed with full serials permissions. > >After applying patch: >1) Serial receive page can only be accessed when user has receive_serials >permission. > >2) Edit and serial receive links are hidden, when user doesn't have >serials_receive permission. Page is accessible with at least 1 serials >permission. > >I will send a another patch to correct behaviour for the routing permission. > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > .../prog/en/modules/serials/serials-collection.tt | 13 ++++++++++--- > serials/serials-collection.pl | 2 +- > serials/serials-edit.pl | 2 +- > 3 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index 3777f47..7b8efef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -201,8 +201,8 @@ $(document).ready(function() { > </th> > <th>Routing > </th> >- <th>Edit >- </th> >+ >+ [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %] > </tr> > [% FOREACH serial IN year.serials %] > [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %] >@@ -230,6 +230,7 @@ $(document).ready(function() { > <td> > <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %]'); return false" >Print list</a> > </td> >+ [% IF ( CAN_user_serials_receive_serials ) %] > <td> > [% IF ( serial.cannotedit ) %] > disabled >@@ -245,10 +246,16 @@ $(document).ready(function() { > [% END %] > [% END %] > </td> >+ [% END %] > </tr> > [% END %] > </table> >- <p><input type="submit" value="Edit serials" /> <input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" /></p> >+ [% IF ( CAN_user_serials_receive_serials ) %] >+ <p> >+ <input type="submit" value="Edit serials" /> >+ <input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" /> >+ </p> >+ [% END %] > </div> > [% END %] > <input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" /> >diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl >index a67db7a..4fe55f0 100755 >--- a/serials/serials-collection.pl >+++ b/serials/serials-collection.pl >@@ -42,7 +42,7 @@ my ($template, $loggedinuser, $cookie); > query => $query, > type => "intranet", > authnotrequired => 0, >- flagsrequired => {serials => 'receive_serials'}, >+ flagsrequired => {serials => '*'}, > debug => 1, > }); > my $biblionumber = $query->param('biblionumber'); >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 9ecd09f..b66764a 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -115,7 +115,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > query => $query, > type => 'intranet', > authnotrequired => 0, >- flagsrequired => { serials => 1 }, >+ flagsrequired => { serials => 'receive_serials' }, > debug => 1, > } > ); >-- >1.7.2.5
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 7521
:
7553
|
7554
| 7595