AngularClient: Fix operator.pasPerms() after a reload
This commit is contained in:
parent
07bd763a63
commit
b1e7259ce5
@ -59,10 +59,6 @@ angular.module('OpenSlidesApp.users', [])
|
||||
// Add registered group
|
||||
allGroups.push(2);
|
||||
_.forEach(allGroups, function(groupId) {
|
||||
// Get group from server
|
||||
Group.find(groupId);
|
||||
// But do not work with the returned promise, because in
|
||||
// this case this method can not be called in $watch
|
||||
var group = Group.get(groupId);
|
||||
if (group) {
|
||||
_.forEach(group.permissions, function(perm) {
|
||||
|
@ -178,6 +178,8 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
operator.setUser(data.user_id);
|
||||
});
|
||||
$rootScope.operator = operator;
|
||||
// Load all Groups. They are needed later
|
||||
Group.findAll();
|
||||
}
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user