Bugzilla – Attachment 64545 Details for
Bug 18834
Show "Anyone seeing this list" permission only for shared and public lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18834: Show "Anyone seeing this list" permission only for shared and public lists
Bug-18834-Show-Anyone-seeing-this-list-permission-.patch (text/plain), 6.40 KB, created by
Lee Jamison
on 2017-06-22 14:32:10 UTC
(
hide
)
Description:
Bug 18834: Show "Anyone seeing this list" permission only for shared and public lists
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2017-06-22 14:32:10 UTC
Size:
6.40 KB
patch
obsolete
>From 8b9bb7b7538a26299100053380278490d8afcf52 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 18834: Show "Anyone seeing this list" permission only for > shared and public lists > >This is a follow-up of report 18228 that simplifies the permissions for >lists. It reapplies the idea of bug 10865, but with one difference: It does >not completely hide all permissions if adding public or shared lists is not >allowed; it only hides the Anyone-permission if it is not relevant. > >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] Disable OpacAllowPublicListCreation and OpacAllowSharingPrivateLists. >[2] Edit a public list in staff view. Toggle permissions, save and reopen > to check the value you saved. Is Anyone permission included? >[3] Edit a private list (without shares) in staff. Is Anyone excluded? >[4] Edit the same private list in OPAC. Is Anyone excluded too? >[5] Enable OpacAllowPublicListCreation. Create a public list in OPAC. >[6] Edit this list in OPAC. Do you see Anyone? Save with Anyone. >[7] Change category to Private. Save and reopen. Is Owner selected now, > and Anyone excluded? >[8] Enable sharing. Share a list and accept it with another user. > [You can also manually insert a record in virtualshelfshares.] > Edit the list in OPAC as owner. Do you see Anyone? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> >--- > .../prog/en/modules/virtualshelves/shelves.tt | 30 ++++++++++++++++------ > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 16 +++++++++--- > 2 files changed, 35 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..179a6da 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,27 @@ > [% 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.is_public || shelf.is_shared %] >+ [% 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 %] >+ [% END %] >+ >+ </select> >+ </li> >+[% END %] >+ > [% IF print %] > <script type="text/javascript"> > $( document ).ready(function() { >@@ -549,14 +570,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..afe350c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -14,9 +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.is_public || shelf.is_shared %] >+ [% 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 %] >+ [% END %] >+ > </select> > </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 18834
:
64491
|
64492
|
64493
|
64510
|
64511
|
64512
|
64520
|
64521
|
64522
|
64523
|
64524
|
64525
| 64545 |
64546
|
64547
|
64548