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
ef3e861f
Commit
ef3e861f
authored
Sep 24, 2021
by
seotts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow admins to promote curators
parent
705e8dba
Changes
2
Hide 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 @
ef3e861f
...
...
@@ -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 @
ef3e861f
...
...
@@ -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