[Backport] remove view project permission when the user has not other permissions

stable
Juanfran 2015-06-22 08:31:51 +02:00 committed by Alejandro Alonso
parent 4a41b1f890
commit 5e9453324e
1 changed files with 4 additions and 1 deletions

View File

@ -410,7 +410,10 @@ RolePermissionsDirective = ($rootscope, $repo, $confirm, $compile) ->
activePermissions = _.sortBy(_.map(activePermissions, (t) ->
permission = angular.element(t).parents(".category-item").data("id")
))
if activePermissions.length
activePermissions.push("view_project")
return activePermissions
target = angular.element(event.currentTarget)