You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added Admin Settings changes for super editor role (#22452)
ref #22445
This PR contains the admin-x-settings changes needed to allow the super
editor role.
---------
Co-authored-by: Steve Larson <[email protected]>
// If the editor beta is enabled, replace the editor role option with super editor options.
180
+
// This gets a little weird, because we aren't changing what is actually assigned based on the toggle.
181
+
// So, a site could have the editor beta enabled, but that doesn't automatically convert their editors.
182
+
// (Editors can be up/downgraded by reassigning them in this modal. For 6.0, we should decide whether
183
+
// the old editors are going away or whether both roles are staying, and tidy this up then.)
184
+
185
+
if(editorBeta){
186
+
roleOptions[2]={
187
+
hint: 'Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site. Can manage members and moderate comments.',
hint: 'Can create and edit their own posts, but cannot publish. An Editor needs to approve and publish for them.',
25
+
label: 'Contributor',
26
+
value: 'contributor'
27
+
},
28
+
{
29
+
hint: 'A trusted user who can create, edit and publish their own posts, but can’t modify others.',
30
+
label: 'Author',
31
+
value: 'author'
32
+
},
33
+
{
34
+
hint: 'Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site.',
35
+
label: 'Editor',
36
+
value: 'editor'
37
+
},
38
+
{
39
+
hint: 'Trusted staff user who should be able to manage all content and users, as well as site settings and options.',
40
+
label: 'Administrator',
41
+
value: 'administrator'
42
+
}
43
+
];
44
+
// if the editor beta is enabled, replace the editor role with super editor
45
+
if(editorBeta){
46
+
optionsArray=optionsArray.map((option)=>{
47
+
if(option.value==='editor'){
48
+
return{
49
+
...option,
50
+
label: 'Editor (beta mode)',
51
+
value: 'super editor',
52
+
hint: 'Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site. Can manage members and moderate comments.'
53
+
};
54
+
}
55
+
returnoption;
56
+
});
57
+
}
19
58
20
59
return(
21
60
<Radio
22
61
id='role'
23
-
options={[
24
-
{
25
-
hint: 'Can create and edit their own posts, but cannot publish. An Editor needs to approve and publish for them.',
26
-
label: 'Contributor',
27
-
value: 'contributor'
28
-
},
29
-
{
30
-
hint: 'A trusted user who can create, edit and publish their own posts, but can’t modify others.',
31
-
label: 'Author',
32
-
value: 'author'
33
-
},
34
-
{
35
-
hint: 'Can invite and manage other Authors and Contributors, as well as edit and publish any posts on the site.',
36
-
label: 'Editor',
37
-
value: 'editor'
38
-
},
39
-
{
40
-
hint: 'Trusted staff user who should be able to manage all content and users, as well as site settings and options.',
0 commit comments