diff --git a/README.txt b/README.txt index 94f3e6d..24d7cc4 100644 --- a/README.txt +++ b/README.txt @@ -128,6 +128,11 @@ Q: How should I update from Drupal 6? A: Run update.php; Enable the og-migrate module and execute all the migration plugins. +Q: How should I update from OG user roles D6? +A: Create a new variable named og_7000_access_field_default_value and set it to + FALSE, this will ensure that global roles are used (as in D6), You can later + modify each group to allow specific roles and permissions per group. + Q: How should I update from a previous Drupal 7 release (e.g. 7.x-1.0 to 7.x-1.1)? A: Same as updating from Drupal 6 -- Run update.php; If requested enable the diff --git a/og_ui/includes/migrate/7000/populate_field.inc b/og_ui/includes/migrate/7000/populate_field.inc index 13ed128..5902f6c 100644 --- a/og_ui/includes/migrate/7000/populate_field.inc +++ b/og_ui/includes/migrate/7000/populate_field.inc @@ -41,7 +41,7 @@ class OgUiPopulateField extends DynamicMigration { $this->destination = new MigrateDestinationNode($bundle); $this->addFieldMapping('nid', 'nid'); - $this->addFieldMapping(OG_DEFAULT_ACCESS_FIELD, NULL)->defaultValue(TRUE); + $this->addFieldMapping(OG_DEFAULT_ACCESS_FIELD, NULL)->defaultValue((int) variable_get('og_7000_access_field_default_value', TRUE)); } /** diff --git a/og_ui/og_ui.module b/og_ui/og_ui.module index cb830a7..d601400 100644 --- a/og_ui/og_ui.module +++ b/og_ui/og_ui.module @@ -1141,7 +1141,9 @@ function og_ui_migrate_api() { $migrations = array(); if (db_table_exists('d6_og')) { $migrations['OgUiMigrateAddField'] = array('class_name' => 'OgUiMigrateAddField'); - $migrations['OgUiSetRoles'] = array('class_name' => 'OgUiSetRoles'); + if (variable_get('og_7000_access_field_default_value', TRUE)) { + $migrations['OgUiSetRoles'] = array('class_name' => 'OgUiSetRoles'); + } foreach (node_type_get_names() as $bundle => $value) { $machine_name = 'OgUiPopulateField' . ucfirst($bundle);