Skip to content
Snippets Groups Projects
Commit 2b0e8773 authored by Igor Biki's avatar Igor Biki
Browse files

Merge branch...

Merge branch 'feature/ISTWCMS-6076-l26yan-Swap-the-order-content-author-and-content-editor-roles' into '1.1.x'

ISTWCMS-6076 Swap the order content author and content editor roles

See merge request !313
parents 1da24cca 16ce6073
No related branches found
No related tags found
1 merge request!313ISTWCMS-6076 Swap the order content author and content editor roles
......@@ -40,8 +40,8 @@ class UwRoles {
return [
'uw_role_site_owner',
'uw_role_site_manager',
'uw_role_content_author',
'uw_role_content_editor',
'uw_role_content_author',
'uw_role_form_editor',
'uw_role_form_results_access',
'uw_role_private_content_viewer',
......@@ -98,12 +98,12 @@ class UwRoles {
case 'uw_role_site_manager':
return 'Site manager';
case 'uw_role_content_author':
return 'Content author';
case 'uw_role_content_editor':
return 'Content editor';
case 'uw_role_content_author':
return 'Content author';
case 'uw_role_form_editor':
return 'Form editor';
......
......@@ -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