summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-02-28 13:09:23 -0800
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 11:49:52 -0800
commitd9cfed07cd1048328499ae06807368be29bdeb2c (patch)
treebca8d63e1c1c31fa5c6dca2878d789455a7f99f5 /app/policies
parent846e581732e291f8927d04a5b1b40fe8f2688885 (diff)
downloadgitlab-ce-d9cfed07cd1048328499ae06807368be29bdeb2c.tar.gz
add User#internal? and some global permissions
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/global_policy.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb
index 3c2fbe6b56b..a1946584dd0 100644
--- a/app/policies/global_policy.rb
+++ b/app/policies/global_policy.rb
@@ -4,5 +4,11 @@ class GlobalPolicy < BasePolicy
can! :create_group if @user.can_create_group
can! :read_users_list
+
+ unless @user.blocked? || @user.internal?
+ can! :log_in
+ can! :access_api
+ can! :access_git
+ end
end
end