Skip to content
Snippets Groups Projects
Commit 16ce6073 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-6076 Swap the order of the content author and content editor roles for the existing site

parent 88b3f3e4
No related branches found
No related tags found
1 merge request!313ISTWCMS-6076 Swap the order content author and content editor roles
......@@ -708,3 +708,22 @@ function uw_cfg_common_update_9106(&$sandbox) {
}
}
}
/**
* Swap the order of content author and editor roles.
*/
function uw_cfg_common_update_9107(&$sandbox) {
// The original weight of content editor role is 5.
// The original weight of content author role is 4.
$role_ids = [
'uw_role_content_editor' => 4,
'uw_role_content_author' => 5,
];
// Set new weight of content editor role as 4.
// Set new weight of content author role as 5.
foreach ($role_ids as $role_id => $weight) {
$role = Role::load($role_id);
$role->setWeight($weight);
$role->save();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment