Bug 9382 - updating permission labels
[koha.git] / installer / data / mysql / updatedatabase.pl
index 15aee32..d22d0bb 100755 (executable)
@@ -5658,6 +5658,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+
 $DBversion = '3.09.00.033';
 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSuppressionByIPRange','','Restrict the suppression to IP adresses outside of the IP range','','free');");
@@ -5972,7 +5973,6 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
-
 $DBversion = "3.09.00.057";
 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do("ALTER TABLE aqbasket ADD deliveryplace VARCHAR(10) default NULL AFTER basketgroupid;");
@@ -6317,6 +6317,79 @@ if ( CheckVersion($DBversion) ) {
    SetVersion ($DBversion);
 }
 
+$DBversion = "3.11.00.012";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldsOnPatronsPossessions', '1', 'Allow holds on records that patron have items of it',NULL,'YesNo')");
+    print "Upgrade to $DBversion done (Bug 9206: Only allow place holds in records that the patron don't have in his possession)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.013";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free')");
+    print "Upgrade to $DBversion done (Bug 9162 - Add a system preference to set which notes fields appears on title notes/description separator)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.014";
+if ( CheckVersion($DBversion) ) {
+   $dbh->do("INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SCOUserCSS', '', 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free' )");
+   $dbh->do("INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SCOUserJS', '', 'Define custom javascript for inclusion in the SCO module', 'free' )");
+   print "Upgrade to $DBversion done (Bug 9009: Add SCOUserCSS and SCOUserJS sysprefs)\n";
+   SetVersion ($DBversion);
+}
+
+$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');");
+    print "Upgrade to $DBversion done (Add sysprefs RentalsInNoissuesCharge and ManInvInNoissuesCharge.)\n";
+    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)