changeAdmin fixes
This commit is contained in:
parent
6231a743ea
commit
b460a2fec4
@ -162,7 +162,8 @@ Meteor.methods({
|
||||
if (Roles.userIsInRole(Meteor.userId(), ['superadmin', 'admin'])) {
|
||||
classes.update({_id: input[1]}, {$set: {admin: input[0]}});
|
||||
} else if (found && foundclass && foundclass.admin == Meteor.userId() &&
|
||||
foundclass.banned.indexOf(input[0]) != -1) {
|
||||
foundclass.banned.indexOf(input[0]) === -1 &&
|
||||
foundclass.subscribers.indexOf(input[0]) !== -1) {
|
||||
classes.update({_id: input[1]}, {$set: {admin: input[0]}});
|
||||
} else {
|
||||
throw "Unauthorized";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user