Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2017-04-27 13:14:58 +02:00
Родитель 74c8a6e848
Коммит 04f5e2c2e1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -58,11 +58,11 @@ app.factory('BoardService', function(ApiService, $http, $q){
var acl = self.generateAcl('user', item);
var exists = false;
angular.forEach(self.getCurrent().acl, function (acl) {
if (acl.participant.primaryKey === item.value.shareWith || OC.getCurrentUser() === item.value.shareWith) {
if (acl.participant.primaryKey === item.value.shareWith) {
exists = true;
}
});
if (!exists) {
if (!exists && OC.getCurrentUser().uid !== item.value.shareWith) {
self.sharees.push(acl);
}
});
@ -156,7 +156,6 @@ app.factory('BoardService', function(ApiService, $http, $q){
var deferred = $q.defer();
$http.get(this.baseUrl + '/' + board.id + '/permissions').then(function (response) {
board.permissions = response.data;
console.log(board.permissions);
deferred.resolve(response.data);
}, function (error) {
deferred.reject('Error fetching board permissions ' + board);