Bugzilla – Attachment 65347 Details for
Bug 18980
Add an explanation when Anyone permission has no actual effect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18980: Add remark next to "Anyone seeing this list" permission
Bug-18980-Add-remark-next-to-Anyone-seeing-this-li.patch (text/plain), 5.90 KB, created by
Nick Clemens (kidclamp)
on 2017-07-31 14:05:28 UTC
(
hide
)
Description:
Bug 18980: Add remark next to "Anyone seeing this list" permission
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-07-31 14:05:28 UTC
Size:
5.90 KB
patch
obsolete
>From 67103c1950ec2e44bf7328834259d4b4e493d26d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 21 Jun 2017 13:13:17 +0200 >Subject: [PATCH] Bug 18980: Add remark next to "Anyone seeing this list" > permission >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This is a follow-up of report 18228 that simplifies the permissions for >lists. It reapplies the idea behind bug 10865 by adding a remark next to >the Anyone permission if it is not actually effective. A next patch will >make it behave dynamically. > >Note: The Anyone permission is not relevant if it is a private list that >has no shares. Note that looking at the prefs OpacAllowPublicListCreation >and/or OpacAllowSharingPrivateLists is not decisive. You should look at >list permissions and shares in the database; turning off the Sharing pref >does not automatically remove all shares in the system. It only blocks >creating new shares. > >We only need changes in opac-shelves.tt and virtualshelves/shelves.tt. > >Test plan: >[1] Verify that you see the remark now in OPAC and staff. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../prog/en/modules/virtualshelves/shelves.tt | 29 ++++++++++++++++------ > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 15 ++++++++--- > 2 files changed, 33 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index d28250a..2b32ca0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -9,6 +9,26 @@ > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> > >+[% BLOCK list_permissions %] >+ <li> >+ <label for="allow_changes_from">Allow changes to contents from: </label> >+ <select name="allow_changes_from" id="allow_changes_from"> >+ >+ [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %] >+ >+ [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %] >+ <option value="1" selected="selected">Owner only</option> >+ [% ELSE %] >+ <option value="1">Owner only</option> >+ [% END %] >+ >+ [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %] >+ >+ </select> >+   <span id="anyone_remark" style="color:red;">The Anyone permission has no actual effect while this list is strictly private.</span> >+ </li> >+[% END %] >+ > [% IF print %] > <script type="text/javascript"> > $( document ).ready(function() { >@@ -549,14 +569,7 @@ function placeHold () { > [% END %] > </select></li> > >- <li> >- <label for="allow_changes_from">Allow changes to contents from: </label> >- <select name="allow_changes_from" id="allow_changes_from"> >- [% IF !shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %] >- [% IF shelf.allow_change_from_owner && !shelf.allow_change_from_others %]<option value="1" selected="selected">Owner only</option>[% ELSE %]<option value="1">Owner only</option>[% END %] >- [% IF shelf.allow_change_from_owner && shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %] >- </select> >- </li> >+ [% INCLUDE list_permissions %] > > </ol> > </fieldset> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 2c162c0..f6922f1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -14,10 +14,19 @@ > <li> > <label for="allow_changes_from">Allow changes to contents from: </label> > <select name="allow_changes_from" id="allow_changes_from"> >- [% IF !shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %] >- [% IF shelf.allow_change_from_owner && !shelf.allow_change_from_others %]<option value="1" selected="selected">Owner only</option>[% ELSE %]<option value="1">Owner only</option>[% END %] >- [% IF shelf.allow_change_from_owner && shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %] >+ >+ [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %] >+ >+ [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %] >+ <option value="1" selected="selected">Owner only</option> >+ [% ELSE %] >+ <option value="1">Owner only</option> >+ [% END %] >+ >+ [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %] >+ > </select> >+   <span id="anyone_remark" style="color:red;">The Anyone permission has no actual effect while this list is strictly private.</span> > </li> > [% END %] > >-- >2.1.4
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 18980
:
65229
|
65230
|
65231
|
65232
|
65273
|
65274
|
65275
|
65276
| 65347 |
65348
|
65349
|
65350