From 04f5e2c2e1fa697de48e6cc3125709be4056a5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 27 Apr 2017 13:14:58 +0200 Subject: [PATCH] Don't show own user account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/service/BoardService.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/service/BoardService.js b/js/service/BoardService.js index cc7ad5e22..b359b1730 100644 --- a/js/service/BoardService.js +++ b/js/service/BoardService.js @@ -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);