Fix race condition when loading the user list
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -198,13 +198,13 @@ app.factory('BoardService', function (ApiService, $http, $q) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = [this.getCurrent().owner];
|
this.getCurrent().users = [this.getCurrent().owner];
|
||||||
|
let self = this;
|
||||||
angular.forEach(this.getCurrent().acl, function(value, key) {
|
angular.forEach(this.getCurrent().acl, function(value, key) {
|
||||||
if (value.type === OC.Share.SHARE_TYPE_USER) {
|
if (value.type === OC.Share.SHARE_TYPE_USER) {
|
||||||
result.push(value.participant);
|
self.getCurrent().users.push(value.participant);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.getCurrent().users = result;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BoardService.prototype.getUsers = function () {
|
BoardService.prototype.getUsers = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user