mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
fix(studio): do not show mute error as if manager can edit info
This commit is contained in:
parent
6dbf8d1bd5
commit
e719d25e3d
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
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) &&
|
||||
(selectIsAdmin(state) ||
|
||||
isManager(state) ||
|
||||
|
|
|
@ -503,7 +503,7 @@ describe('studio mute errors', () => {
|
|||
['unconfirmed', false],
|
||||
['logged out', false],
|
||||
// ['muted creator', true], // This one fails; not sure why
|
||||
['muted manager', true],
|
||||
['muted manager', false],
|
||||
['muted curator', false],
|
||||
['muted logged in', false]
|
||||
])('%s: %s', (role, expected) => {
|
||||
|
|
Loading…
Reference in a new issue