From e7ed4195d4807d70715e7d7a545ce77df337c8f6 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy 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 Content-Type: text/plain; charset=utf-8 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? --- .../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' %] +[% BLOCK list_permissions %] +
  • + + +
  • +[% END %] + [% IF print %]