diff --git a/migration/export_users.php b/migration/export_users.php index 35fa7bb8ac..d2fe2499a1 100755 --- a/migration/export_users.php +++ b/migration/export_users.php @@ -27,7 +27,7 @@ require_once 'storage.php'; $res = db_query_params ('SELECT user_id,user_pw,user_name,realname,email,add_date,timezone FROM users WHERE status=$1 ORDER BY user_id', array('A')); $user_ids = &util_result_column_to_array ($res, "user_id"); -$user_pws = &util_result_column_to_array ($res, "user_pws"); +$user_pws = &util_result_column_to_array ($res, "user_pw"); $user_names = &util_result_column_to_array ($res, "user_name"); $user_realnames = &util_result_column_to_array ($res, "realname"); $user_emails = &util_result_column_to_array ($res, "email"); diff --git a/migration/import_projects.php b/migration/import_projects.php index 0d1fd7a848..f9de9a07b6 100755 --- a/migration/import_projects.php +++ b/migration/import_projects.php @@ -7,10 +7,14 @@ require_once 'storage.php'; require_once 'adapt.php'; require_once 'phab.php'; +/* user groups */ +$all_developers = array_merge(array_merge($bf_developers, $addon_developers), $translation_developers); +create_project("Moderators", "None", true, $all_developers, "Users with more edit capabilities.", true); + /* projects */ -create_project("BF Blender", "None", true, $bf_developers, "Blender Foundation official release."); -create_project("Addons", "None", true, $addon_developers, "Addon scripts and plugins for Blender."); -create_project("Translations", "None", true, $translation_developers, "Localization of Blender in different languages."); +create_project("BF Blender", "None", true, $bf_developers, "Blender Foundation official release.", true); +create_project("Addons", "None", true, $addon_developers, "Addon scripts and plugins for Blender.", true); +create_project("Translations", "None", true, $translation_developers, "Localization of Blender in various languages.", true); /* modules */ //create_project("None", "None", true, array(), ""); // None diff --git a/migration/migration_steps.txt b/migration/migration_steps.txt index e17b7c739d..932dfcaa2d 100644 --- a/migration/migration_steps.txt +++ b/migration/migration_steps.txt @@ -60,7 +60,7 @@ set maniphest.priorities } -Disable irrelevant applications and set policies (TODO figure out policies!) +Disable irrelevant applications B) FILE STORAGE @@ -110,6 +110,8 @@ copy over dump/ folder ./import_projects.php +Set maniphest policies for Moderators (avoids it showing up in transactions) + F) IMPORT TASKS =============== diff --git a/migration/phab.php b/migration/phab.php index 679f9fc5ab..111bcc3ced 100644 --- a/migration/phab.php +++ b/migration/phab.php @@ -84,7 +84,7 @@ function create_task($user, $id, $title, $projects, $description, $assign_user, $changes = array(); $changes[ManiphestTransaction::TYPE_STATUS] = ManiphestTaskStatus::STATUS_OPEN; $changes[PhabricatorTransactions::TYPE_VIEW_POLICY] = 'public'; - $changes[PhabricatorTransactions::TYPE_EDIT_POLICY] = 'admin'; // TODO which permission? + $changes[PhabricatorTransactions::TYPE_EDIT_POLICY] = lookup_project("Moderators")->getPHID(); $template = new ManiphestTransaction(); @@ -210,7 +210,7 @@ function set_status($task, $user, $status, $date) ->applyTransactions($task, $transactions); } -function create_project($name, $username, $active, $membernames, $blurb = '') +function create_project($name, $username, $active, $membernames, $blurb = '', $admincontrol = false) { $user = lookup_user($username); @@ -222,10 +222,15 @@ function create_project($name, $username, $active, $membernames, $blurb = '') $xactions = array(); + if($admincontrol) + $editpolicy = "admin"; + else + $editpolicy = lookup_project("Moderators")->getPHID(); + /* policy */ $project->setViewPolicy("public"); - $project->setEditPolicy("admin"); - $project->setJoinPolicy("admin"); + $project->setEditPolicy($editpolicy); + $project->setJoinPolicy($editpolicy); /* archived */ if(!$active) diff --git a/webroot/rsrc/custom/static/login.html b/webroot/rsrc/custom/static/login.html index ec046a13f7..b55a7afee6 100644 --- a/webroot/rsrc/custom/static/login.html +++ b/webroot/rsrc/custom/static/login.html @@ -1 +1,3 @@
Welcome to the new Blender developer website! Accounts and passwords from projects.blender.org have been preserved and can still be used to log in.
+ +This is a test version of the site, any data you create here may be removed before the final website goes live!