Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
c4c48578
Unverified
Commit
c4c48578
authored
Sep 27, 2021
by
Sarah Otts
Committed by
GitHub
Sep 27, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6097 from seotts/admins-can-promote
Allow admins to promote curators to managers
parents
923f3fcf
ef3e861f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/redux/studio-permissions.js
src/redux/studio-permissions.js
+1
-1
test/unit/redux/studio-permissions.test.js
test/unit/redux/studio-permissions.test.js
+1
-1
No files found.
src/redux/studio-permissions.js
View file @
c4c48578
...
...
@@ -52,7 +52,7 @@ const selectCanRemoveCurator = (state, username) => {
};
const
selectCanRemoveManager
=
(
state
,
managerId
)
=>
!
selectIsMuted
(
state
)
&&
(
selectIsAdmin
(
state
)
||
isManager
(
state
))
&&
managerId
!==
state
.
studio
.
host
;
const
selectCanPromoteCurators
=
state
=>
!
selectIsMuted
(
state
)
&&
isManager
(
state
);
const
selectCanPromoteCurators
=
state
=>
!
selectIsMuted
(
state
)
&&
(
isManager
(
state
)
||
selectIsAdmin
(
state
)
);
const
selectCanTransfer
=
(
state
,
managerId
)
=>
{
// Nobody can transfer a class studio.
...
...
test/unit/redux/studio-permissions.test.js
View file @
c4c48578
...
...
@@ -344,7 +344,7 @@ describe('studio members', () => {
describe
(
'
can promote curators
'
,
()
=>
{
test
.
each
([
[
'
admin
'
,
fals
e
],
[
'
admin
'
,
tru
e
],
[
'
curator
'
,
false
],
[
'
manager
'
,
true
],
[
'
creator
'
,
true
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment