Move to numeric acl types
fixes #297 Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
Julius Härtl
parent
ef64dfc5a2
commit
a8aab8d049
@@ -20,7 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** global: oc_defaults */
|
||||
/** global: oc_defaults, OC */
|
||||
app.controller('BoardController', function ($rootScope, $scope, $stateParams, StatusService, BoardService, StackService, CardService, LabelService, $state, $transitions, $filter) {
|
||||
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
@@ -32,6 +32,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
$scope.newLabel = {};
|
||||
$scope.status.boardtab = $stateParams.detailTab;
|
||||
|
||||
$scope.OC = OC;
|
||||
$scope.stackservice = StackService;
|
||||
$scope.boardservice = BoardService;
|
||||
$scope.cardservice = CardService;
|
||||
@@ -208,6 +209,16 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
BoardService.updateAcl(acl);
|
||||
};
|
||||
|
||||
$scope.aclTypeString = function (acl) {
|
||||
switch (acl.type) {
|
||||
case OC.Share.SHARE_TYPE_USER:
|
||||
return 'user';
|
||||
case OC.Share.SHARE_TYPE_GROUP:
|
||||
return 'group';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
// settings for card sorting
|
||||
$scope.sortOptions = {
|
||||
|
||||
@@ -82,7 +82,7 @@ app.factory('BoardService', function (ApiService, $http, $q) {
|
||||
|
||||
// filter out everyone who is already in the share list
|
||||
angular.forEach(users, function (item) {
|
||||
var acl = self.generateAcl('user', item);
|
||||
var acl = self.generateAcl(OC.Share.SHARE_TYPE_USER, item);
|
||||
var exists = false;
|
||||
angular.forEach(self.getCurrent().acl, function (acl) {
|
||||
if (acl.participant.primaryKey === item.value.shareWith) {
|
||||
@@ -94,7 +94,7 @@ app.factory('BoardService', function (ApiService, $http, $q) {
|
||||
}
|
||||
});
|
||||
angular.forEach(groups, function (item) {
|
||||
var acl = self.generateAcl('group', item);
|
||||
var acl = self.generateAcl(OC.Share.SHARE_TYPE_GROUP, item);
|
||||
var exists = false;
|
||||
angular.forEach(self.getCurrent().acl, function (acl) {
|
||||
if (acl.participant.primaryKey === item.value.shareWith) {
|
||||
|
||||
Reference in New Issue
Block a user