Bug 9382 - updating permission labels
[koha.git] / installer / data / mysql / updatedatabase.pl
index 1646fa6..d22d0bb 100755 (executable)
@@ -6339,7 +6339,7 @@ if ( CheckVersion($DBversion) ) {
    SetVersion ($DBversion);
 }
 
-$DBversion = "3.11.00.XXX";
+$DBversion = "3.11.00.015";
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('RentalsInNoissuesCharge', '1', 'Rental charges block checkouts (added to noissuescharge).',NULL,'YesNo');");
     $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ManInvInNoissuesCharge', '1', 'MANUAL_INV charges block checkouts (added to noissuescharge).',NULL,'YesNo');");
@@ -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)