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
5827aaab
Commit
5827aaab
authored
Apr 27, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update permissions for editing open_to_all to match current backend
parent
dec9f96e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/redux/studio-permissions.js
src/redux/studio-permissions.js
+2
-2
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 @
5827aaab
...
...
@@ -25,9 +25,9 @@ const selectCanDeleteCommentWithoutConfirm = state => selectIsAdmin(state);
const
selectCanFollowStudio
=
state
=>
selectIsLoggedIn
(
state
);
// Matching existing behavior, only
the
creator is allowed to toggle comments.
// Matching existing behavior, only
admin/
creator is allowed to toggle comments.
const
selectCanEditCommentsAllowed
=
state
=>
selectIsAdmin
(
state
)
||
isCreator
(
state
);
const
selectCanEditOpenToAll
=
state
=>
selectIsAdmin
(
state
)
||
isManager
(
state
);
const
selectCanEditOpenToAll
=
state
=>
isManager
(
state
);
export
{
selectCanEditInfo
,
...
...
test/unit/redux/studio-permissions.test.js
View file @
5827aaab
...
...
@@ -196,7 +196,7 @@ describe('studio comments', () => {
describe
(
'
can set "open to all" on a studio
'
,
()
=>
{
test
.
each
([
[
'
admin
'
,
tru
e
],
[
'
admin
'
,
fals
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