From 5827aaab8fa49e05dedbbd83882fd7e2332172f6 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 27 Apr 2021 09:06:40 -0400 Subject: [PATCH] Update permissions for editing open_to_all to match current backend --- src/redux/studio-permissions.js | 4 ++-- test/unit/redux/studio-permissions.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/redux/studio-permissions.js b/src/redux/studio-permissions.js index b2d7caad7..682ff0fa8 100644 --- a/src/redux/studio-permissions.js +++ b/src/redux/studio-permissions.js @@ -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, diff --git a/test/unit/redux/studio-permissions.test.js b/test/unit/redux/studio-permissions.test.js index 648a100bf..1c5b59925 100644 --- a/test/unit/redux/studio-permissions.test.js +++ b/test/unit/redux/studio-permissions.test.js @@ -196,7 +196,7 @@ describe('studio comments', () => { describe('can set "open to all" on a studio', () => { test.each([ - ['admin', true], + ['admin', false], ['curator', false], ['manager', true], ['creator', true],