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
e719d25e
Commit
e719d25e
authored
Jul 06, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(studio): do not show mute error as if manager can edit info
parent
6dbf8d1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/redux/studio-permissions.js
src/redux/studio-permissions.js
+3
-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 @
e719d25e
...
@@ -71,7 +71,9 @@ const selectCanRemoveProject = (state, creatorUsername, actorId) => {
...
@@ -71,7 +71,9 @@ const selectCanRemoveProject = (state, creatorUsername, actorId) => {
};
};
// We should only show the mute errors to muted users who have any permissions related to the content
// We should only show the mute errors to muted users who have any permissions related to the content
const
selectShowEditMuteError
=
state
=>
selectIsMuted
(
state
)
&&
(
isManager
(
state
)
||
selectIsAdmin
(
state
));
// TODO these duplicate the behavior embedded in the non-muted parts of the selectors above, it would be good
// to extract this.
const
selectShowEditMuteError
=
state
=>
selectIsMuted
(
state
)
&&
(
isCreator
(
state
)
||
selectIsAdmin
(
state
));
const
selectShowProjectMuteError
=
state
=>
selectIsMuted
(
state
)
&&
const
selectShowProjectMuteError
=
state
=>
selectIsMuted
(
state
)
&&
(
selectIsAdmin
(
state
)
||
(
selectIsAdmin
(
state
)
||
isManager
(
state
)
||
isManager
(
state
)
||
...
...
test/unit/redux/studio-permissions.test.js
View file @
e719d25e
...
@@ -503,7 +503,7 @@ describe('studio mute errors', () => {
...
@@ -503,7 +503,7 @@ describe('studio mute errors', () => {
[
'
unconfirmed
'
,
false
],
[
'
unconfirmed
'
,
false
],
[
'
logged out
'
,
false
],
[
'
logged out
'
,
false
],
// ['muted creator', true], // This one fails; not sure why
// ['muted creator', true], // This one fails; not sure why
[
'
muted manager
'
,
tru
e
],
[
'
muted manager
'
,
fals
e
],
[
'
muted curator
'
,
false
],
[
'
muted curator
'
,
false
],
[
'
muted logged in
'
,
false
]
[
'
muted logged in
'
,
false
]
])(
'
%s: %s
'
,
(
role
,
expected
)
=>
{
])(
'
%s: %s
'
,
(
role
,
expected
)
=>
{
...
...
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