remove view project permission when the user has not other permissions

stable
Juanfran 2015-06-22 08:31:51 +02:00
parent f2e3b6528c
commit f834bf681e
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")
))
activePermissions.push("view_project")
if activePermissions.length
activePermissions.push("view_project")
return activePermissions
target = angular.element(event.currentTarget)