Author: sevein
Date: Tue Feb 14 12:16:01 2012
New Revision: 10884

Log:
Add security settings in the migration script, bump db version

Modified:
   trunk/data/fixtures/settings.yml
   trunk/lib/task/migrate/QubitMigrate111.class.php

Modified: trunk/data/fixtures/settings.yml
==============================================================================
--- trunk/data/fixtures/settings.yml    Tue Feb 14 10:11:27 2012        (r10883)
+++ trunk/data/fixtures/settings.yml    Tue Feb 14 12:16:01 2012        (r10884)
@@ -3,7 +3,7 @@
     name: version
     editable: 0
     deleteable: 0
-    value: 77
+    value: 78
   QubitSetting_2:
     name: upload_dir
     editable: 0

Modified: trunk/lib/task/migrate/QubitMigrate111.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate111.class.php    Tue Feb 14 10:11:27 
2012        (r10883)
+++ trunk/lib/task/migrate/QubitMigrate111.class.php    Tue Feb 14 12:16:01 
2012        (r10884)
@@ -54,6 +54,9 @@
 
       case 76:
         $this->addSwordSettings();
+
+      case 77:
+        $this->addSecuritySettings();
     }
 
     // Delete "stub" objects
@@ -95,6 +98,34 @@
   }
 
   /**
+   * Add security settings
+   *
+   * @return QubitMigrate111 this object
+   */
+  protected function addSecuritySettings()
+  {
+    $this->data['QubitSetting']['QubitSetting_requireSslAdmin'] = array(
+      'name' => 'require_ssl_admin',
+      'value' => array('en' => 0),
+      'source_culture' => 'en'
+    );
+
+    $this->data['QubitSetting']['QubitSetting_requireStrongPasswords'] = array(
+      'name' => 'require_strong_passwords',
+      'value' => array('en' => 0),
+      'source_culture' => 'en'
+    );
+
+    $this->data['QubitSetting']['QubitSetting_limitAdminIp'] = array(
+      'name' => 'limit_admin_ip',
+      'value' => array('en' => ''),
+      'source_culture' => 'en'
+    );
+
+    return $this;
+  }
+
+  /**
    * Slugs are inserted when some resources are inserted, but slugs are dumped
    * separately when data is dumped. So loading slug data will try to insert
    * duplicate slugs. To work around this, turn slugs into resource properties

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to