mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Merge pull request #6097 from seotts/admins-can-promote
Allow admins to promote curators to managers
This commit is contained in:
commit
c4c48578a7
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ const selectCanRemoveCurator = (state, username) => {
|
||||||
};
|
};
|
||||||
const selectCanRemoveManager = (state, managerId) =>
|
const selectCanRemoveManager = (state, managerId) =>
|
||||||
!selectIsMuted(state) && (selectIsAdmin(state) || isManager(state)) && managerId !== state.studio.host;
|
!selectIsMuted(state) && (selectIsAdmin(state) || isManager(state)) && managerId !== state.studio.host;
|
||||||
const selectCanPromoteCurators = state => !selectIsMuted(state) && isManager(state);
|
const selectCanPromoteCurators = state => !selectIsMuted(state) && (isManager(state) || selectIsAdmin(state));
|
||||||
|
|
||||||
const selectCanTransfer = (state, managerId) => {
|
const selectCanTransfer = (state, managerId) => {
|
||||||
// Nobody can transfer a class studio.
|
// Nobody can transfer a class studio.
|
||||||
|
|
|
@ -344,7 +344,7 @@ describe('studio members', () => {
|
||||||
|
|
||||||
describe('can promote curators', () => {
|
describe('can promote curators', () => {
|
||||||
test.each([
|
test.each([
|
||||||
['admin', false],
|
['admin', true],
|
||||||
['curator', false],
|
['curator', false],
|
||||||
['manager', true],
|
['manager', true],
|
||||||
['creator', true],
|
['creator', true],
|
||||||
|
|
Loading…
Reference in a new issue