fix(studio): do not show mute error as if manager can edit info

This commit is contained in:
Paul Kaplan 2021-07-06 10:42:02 -04:00
parent 6dbf8d1bd5
commit e719d25e3d
2 changed files with 4 additions and 2 deletions

View file

@ -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) ||

View file

@ -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) => {