diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-03-01 00:09:23 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-03-09 22:49:52 +0300 |
commit | d9cfed07cd1048328499ae06807368be29bdeb2c (patch) | |
tree | bca8d63e1c1c31fa5c6dca2878d789455a7f99f5 /app/policies | |
parent | 846e581732e291f8927d04a5b1b40fe8f2688885 (diff) |
add User#internal? and some global permissions
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/global_policy.rb | 6 |
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 |