Bug 9382 - updating permission labels
authorLiz Rea <liz@catalyst.net.nz>
Mon, 14 Jan 2013 02:32:42 +0000 (15:32 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 31 Jan 2013 16:12:54 +0000 (11:12 -0500)
first, replicate:
go to More -> permissions on any user. Notice that it says various things "privileges, flags, permissions" they are interchangeable and inconsistent.
also note that some of the permissions are nonsensical and/or not descriptive enough, or not using canonical terminology (borrowers instead of patrons, for example)

To test:
interface consistency changes

-> means "turns into"

- page title - privileges -> permissions
- breadcrumbs - privileges -> permissions
- headings - privileges -> permissions
- "set flags" button -> save

Permissions that have changed description:

- Catalogue changes to "Required for staff login" in bold (this was the original impetus for this boatload of changes)
- reports
- editauthorities
- management
- serials
- updatecharges
- circulate
- parameters
- borrowers
- tools
- staffaccess
- edit_patrons (only on updatedb, not on new db)

- Read through and make sure there are no typos, and that the descriptions seem to jive with what privileges the permission gives the user. Suggestions are, in fact, welcome.

- If you are feeling ambitious, go ahead and create a new, clean database and check the wording there as well - it should match what has been done in the db update.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested both with existing database and new database

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Tested with existing database.  Introduces no new mysql-isms.
Kudos for adding that syspref in bold, that got me when I first started with Koha
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

installer/data/mysql/en/mandatory/userflags.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt

index e9d9b2e..926e53b 100644 (file)
@@ -1,17 +1,17 @@
 INSERT INTO `userflags` VALUES(0,'superlibrarian','Access to all librarian functions',0);
-INSERT INTO `userflags` VALUES(1,'circulate','Circulate books',0);
-INSERT INTO `userflags` VALUES(2,'catalogue','View Catalog (Librarian Interface)',0);
-INSERT INTO `userflags` VALUES(3,'parameters','Set Koha system parameters',0);
-INSERT INTO `userflags` VALUES(4,'borrowers','Add or modify borrowers',0);
+INSERT INTO `userflags` VALUES(1,'circulate','Check out and check in items',0);
+INSERT INTO `userflags` VALUES(2,'catalogue','<b>Required for staff login.</b> Staff access, allows viewing of catalogue in staff client.',0);
+INSERT INTO `userflags` VALUES(3,'parameters','Manage Koha system settings (Administration panel)',0);
+INSERT INTO `userflags` VALUES(4,'borrowers','Add or modify patrons',0);
 INSERT INTO `userflags` VALUES(5,'permissions','Set user permissions',0);
 INSERT INTO `userflags` VALUES(6,'reserveforothers','Place and modify holds for patrons',0);
 INSERT INTO `userflags` VALUES(7,'borrow','Borrow books',1);
 INSERT INTO `userflags` VALUES(9,'editcatalogue','Edit Catalog (Modify bibliographic/holdings data)',0);
-INSERT INTO `userflags` VALUES(10,'updatecharges','Update borrower charges',0);
+INSERT INTO `userflags` VALUES(10,'updatecharges','Manage patrons fines and fees',0);
 INSERT INTO `userflags` VALUES(11,'acquisition','Acquisition and/or suggestion management',0);
-INSERT INTO `userflags` VALUES(12,'management','Set library management parameters',0);
-INSERT INTO `userflags` VALUES(13,'tools','Use tools (export, import, barcodes)',0);
-INSERT INTO `userflags` VALUES(14,'editauthorities','Allow to edit authorities',0);
-INSERT INTO `userflags` VALUES(15,'serials','Allow to manage serials subscriptions',0);
-INSERT INTO `userflags` VALUES(16,'reports','Allow to access to the reports module',0);
-INSERT INTO `userflags` VALUES(17,'staffaccess','Modify login / permissions for staff users',0);
+INSERT INTO `userflags` VALUES(12,'management','Set library management parameters (deprecated)',0);
+INSERT INTO `userflags` VALUES(13,'tools','Use all tools (expand for granular tools permissions)',0);
+INSERT INTO `userflags` VALUES(14,'editauthorities','Edit Authorities',0);
+INSERT INTO `userflags` VALUES(15,'serials','Manage serial subscriptions',0);
+INSERT INTO `userflags` VALUES(16,'reports','Allow access to the reports module',0);
+INSERT INTO `userflags` VALUES(17,'staffaccess','Allow staff members to modify permissions for other staff members',0);
index bd0fc99..d22d0bb 100755 (executable)
@@ -6347,6 +6347,49 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.11.00.XXX";
+if ( CheckVersion($DBversion) ) {
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="<b>Required for staff login.</b> Staff access, allows viewing of catalogue in staff client." where flag="catalogue";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Edit Authorities" where flag="editauthorities";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Allow access to the reports module" where flag="reports";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Set library management parameters (deprecated)" where flag="management";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Manage serial subscriptions" where flag="serials";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Manage patrons fines and fees" where flag="updatecharges";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Check out and check in items" where flag="circulate";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Manage Koha system settings (Administration panel)" where flag="parameters";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Add or modify patrons" where flag="borrowers";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Use all tools (expand for granular tools permissions)" where flag="tools";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Allow staff members to modify permissions for other staff members" where flag="staffaccess";
+        });
+   $dbh->do(q{
+        UPDATE userflags SET flagdesc="Perform batch modification of patrons" where flag="edit_patrons";
+        });
+
+   print "Upgrade to $DBversion done (Bug 9382 - refresh permission descriptions to make more sense)\n";
+   SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
index aa1eebd..dfb22cf 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Patrons &rsaquo; Set privileges for [% surname %], [% firstname %]</title>
+<title>Koha &rsaquo; Patrons &rsaquo; Set permissions for [% surname %], [% firstname %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/treeview/jquery.treeview.css"/>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.treeview.pack.js"></script>
@@ -72,7 +72,7 @@
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'patron-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Set privileges for [% surname %], [% firstname %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Set permissions for [% surname %], [% firstname %]</div>
 
 <div id="doc3" class="yui-t2">
    
@@ -84,7 +84,7 @@
 <form method="post" action="/cgi-bin/koha/members/member-flags.pl">
     <input type="hidden" name="member" id="borrowernumber" value="[% borrowernumber %]" />
     <input type="hidden" name="newflags" value="1" />
-    <h1>Set Privileges for [% surname %], [% firstname %]</h1>
+    <h1>Set permissions for [% surname %], [% firstname %]</h1>
     <!-- <ul id="permissionstree"><li class="root">All privileges<ul> -->
     <ul id="permissionstree" class="treeview-grey">
         <!-- <li class="folder-close">One level down<ul> -->
     <!-- </ul></li></ul> -->
     </ul>
 
-<fieldset class="action"><input type="submit" value="Set Flags" /> <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a></fieldset>
+<fieldset class="action"><input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a></fieldset>
 
 </form>
 </div>