Bugzilla – Attachment 21143 Details for
Bug 10888
Don't hide authorities module from users without permission to edit authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10888 - Don't hide authorities module from users without permission to edit authorities
Bug-10888---Dont-hide-authorities-module-from-user.patch (text/plain), 7.48 KB, created by
Owen Leonard
on 2013-09-17 16:44:42 UTC
(
hide
)
Description:
Bug 10888 - Don't hide authorities module from users without permission to edit authorities
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-09-17 16:44:42 UTC
Size:
7.48 KB
patch
obsolete
>From dab57609c35af3bdb1f4e99b5d1cb18125cba9c4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 13 Sep 2013 14:45:50 -0400 >Subject: [PATCH] Bug 10888 - Don't hide authorities module from users without > permission to edit authorities >Content-Type: text/plain; charset="utf-8" > >It should be possible for staff client users to search and view >authority records even if they don't have permission to edit them. > >To test, apply the patch and view the staff client as a user with and >without "editauthorities" permission. > >With "editauthorities" permission, authority search results should show >both an edit and delete link. Viewing the details of an authority >record, one should see a toolbar with edit/delete/new options. > >The detail view has been altered to use the term "record" in place of >"biblio" ("Used in X record(s)). > >Without "editauthorities" permission, authority search results should >show no edit or delete link. Viewing the details of an authority, the >only option shown in the toolbar should be "Save." > >On the staff client home page and in the header's "More" menu the link >to the authorities module should now appear with and without permission >to edit authorities. > >Revision: Corrected permissions in export script to allow saving of >authority records by users who do not have permission to edit. > >Revision: Corrected incorrect merge with 10600 (duplicate authority) >--- > authorities/export.pl | 2 +- > .../prog/en/includes/authorities-toolbar.inc | 17 +++++++++++++---- > .../intranet-tmpl/prog/en/includes/header.inc | 2 -- > .../en/modules/authorities/searchresultlist.tt | 19 ++++++++++++------- > .../intranet-tmpl/prog/en/modules/intranet-main.tt | 2 -- > 5 files changed, 26 insertions(+), 16 deletions(-) > >diff --git a/authorities/export.pl b/authorities/export.pl >index 9c8ae17..dc886c0 100755 >--- a/authorities/export.pl >+++ b/authorities/export.pl >@@ -15,7 +15,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > query => $query, > type => "intranet", > authnotrequired => 0, >- flagsrequired => { editauthorities => 1 }, >+ flagsrequired => { catalogue => 1 }, > debug => 1, > } > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >index 633560a..b376ce5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc >@@ -9,14 +9,19 @@ > > //]]> > </script> >+ >+[% IF ( authid || CAN_user_editauthorities) %] >+ > <div id="toolbar" class="btn-toolbar"> > > [% IF ( authid ) %] >- <div class="btn-group"><a class="btn btn-small" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="icon-pencil"></i> Edit</a></div> >- [% UNLESS ( count ) %] >- <div class="btn-group"><a href="#" class="btn btn-small" id="delAuth"><i class="icon-remove"></i> Delete</a></div> >+ [% IF ( CAN_user_editauthorities ) %] >+ <div class="btn-group"><a class="btn btn-small" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="icon-pencil"></i> Edit</a></div> >+ <div class="btn-group"><a class="btn btn-small" id="dupAuth" href="authorities.pl?authid=[% authid %]&op=duplicate"><i class="icon-copy"></i> Duplicate</a></div> >+ [% UNLESS ( count ) %] >+ <div class="btn-group"><a href="#" class="btn btn-small" id="delAuth"><i class="icon-remove"></i> Delete</a></div> >+ [% END %] > [% END %] >- <div class="btn-group"><a class="btn btn-small" id="dupAuth" href="authorities.pl?authid=[% authid %]&op=duplicate"><i class="icon-copy"></i> Duplicate</a></div> > > <div class="btn-group"> > <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-download-alt"></i> Save >@@ -31,6 +36,7 @@ > </div> > [% END %] > >+[% IF ( CAN_user_editauthorities ) %] > <div class="btn-group"> > <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New authority > <span class="caret"></span> >@@ -41,4 +47,7 @@ > [% END %] > </ul> > </div> >+[% END %] > </div> >+ >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 58f721f..b6bc660 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -18,9 +18,7 @@ > [% IF ( CAN_user_acquisition ) %] > <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></li> > [% END %] >- [% IF ( CAN_user_editauthorities ) %] > <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li> >- [% END %] > [% IF ( CAN_user_serials ) %] > <li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index 445b541..ea16505 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -67,7 +67,9 @@ function searchauthority() { > [% UNLESS ( isEDITORS ) %] > <th>Used in</th> > [% END %] >- <th>Delete</th> >+ [% IF ( CAN_user_editauthorities ) %] >+ <th> </th> >+ [% END %] > </tr> > [% FOREACH resul IN result %] > [% UNLESS ( loop.odd ) %] >@@ -79,14 +81,17 @@ function searchauthority() { > <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td> > [% UNLESS ( resul.isEDITORS ) %] > <td> >- <a href="../catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=[% resul.authid %]" class="button">[% resul.used %] biblio(s)</a> >+ <a href="../catalogue/search.pl?type=intranet&op=do_search&idx=an,phr&q=[% resul.authid %]" class="button">[% resul.used %] records(s)</a> > </td> > [% END %] >- <td> >- [% UNLESS ( resul.used ) %] >- <a href="javascript:confirm_deletion([% resul.authid %])">Delete</a> >- [% END %] >- </td> >+ [% IF ( CAN_user_editauthorities ) %] >+ <td> >+ <a href="/cgi-bin/koha/authorities/authorities.pl?authid=[% resul.authid %]">Edit</a> >+ [% UNLESS ( resul.used ) %] >+ | <a href="javascript:confirm_deletion([% resul.authid %])">Delete</a> >+ [% END %] >+ </td> >+ [% END %] > </tr> > [% END %] > </table> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 1a43357..8fc64fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -54,11 +54,9 @@ > </li> > [% END %] > >- [% IF ( CAN_user_editauthorities ) %] > <li> > <a class="icon_general icon_authorities" href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> > </li> >- [% END %] > </ul> > </div><!-- /area-list-left --> > </div><!-- /yui-u first --> >-- >1.7.9.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 10888
:
21098
|
21124
|
21142
|
21143
|
21226
|
21229