Merge pull request #3481 from FinnStutzenstein/LockoutProtection

fixed client site lockout protection (fixed #3467)
This commit is contained in:
Emanuel Schütze 2017-11-15 12:37:36 +01:00 committed by GitHub
commit 4f9b1e178f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,11 @@ angular.module('OpenSlidesApp.core', [
}, },
// Returns true if the operator is a member of group. // Returns true if the operator is a member of group.
isInGroup: function(group) { isInGroup: function(group) {
return _.indexOf(operator.user.groups_id, group.id) > -1; var groups = operator.user.groups_id;
if (groups.length === 0) {
groups = [1]; // Set the default group, if no other groups are set.
}
return _.indexOf(groups, group.id) > -1;
}, },
}; };
return operator; return operator;