Disable ui elements if permissions are not sufficient
This commit is contained in:
@@ -25,4 +25,5 @@ app.controller('AppController', function ($scope, $location, $http, $route, $log
|
||||
show: false
|
||||
};
|
||||
$scope.sidebar = $rootScope.sidebar;
|
||||
$scope.user = oc_current_user;
|
||||
});
|
||||
@@ -113,6 +113,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
|
||||
|
||||
// Handle initial Loading
|
||||
BoardService.fetchOne($scope.id).then(function (data) {
|
||||
BoardService.getPermissions();
|
||||
$scope.statusservice.releaseWaiting();
|
||||
}, function (error) {
|
||||
$scope.statusservice.setError('Error occured', error);
|
||||
|
||||
@@ -41,14 +41,14 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
|
||||
});
|
||||
|
||||
$scope.cardRenameShow = function() {
|
||||
if($scope.archived)
|
||||
if($scope.archived || !BoardService.canEdit())
|
||||
return false;
|
||||
else {
|
||||
$scope.status.cardRename=true;
|
||||
}
|
||||
};
|
||||
$scope.cardEditDescriptionShow = function() {
|
||||
if($scope.archived)
|
||||
if($scope.archived || !BoardService.canEdit())
|
||||
return false;
|
||||
else {
|
||||
$scope.status.cardEditDescription=true;
|
||||
|
||||
Reference in New Issue
Block a user