From bb322b7793fc9196ceaaf8b45fd1877dd0d1bfe1 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 7 Nov 2017 09:57:09 +0100 Subject: [PATCH] fixed client site lockout protection (fixed #3467) --- openslides/core/static/js/core/base.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 9455bdbb1..e12f5b55a 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -177,7 +177,11 @@ angular.module('OpenSlidesApp.core', [ }, // Returns true if the operator is a member of 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;