Merge pull request #1689 from ostcar/fix_pas_perms_after_reload
AngularClient: Fix operator.pasPerms() after a reload
This commit is contained in:
commit
2458cc97fb
@ -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