Commit 5d838ef6 authored by Eric Rosenbaum's avatar Eric Rosenbaum

Muted users cannot transfer studio host

parent aecc9cec
......@@ -59,6 +59,7 @@ const selectCanTransfer = (state, managerId) => {
// classroomId is loaded only for educator and admin users. Only educators can create class studios,
// so educators and admins are the only users who otherwise would be able to transfer a class studio.
if (state.studio.classroomId !== null) return false;
if (selectIsMuted(state)) return false; // Muted users cannot transfer studios.
if (state.studio.managers > 1) { // If there is more than one manager,
if (managerId === state.studio.owner) { // and the selected manager is the current owner/host,
if (isHost(state)) return true; // Owner/host can transfer
......
......@@ -443,7 +443,7 @@ describe('studio members', () => {
['logged in', false],
['unconfirmed', false],
['logged out', false],
['muted creator', true], // Muted users do not see the transfer UI
['muted creator', false],
['muted logged in', false]
])('%s: %s', (role, expected) => {
setStateByRole(role);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment