gitlab-org--gitlab-foss/app/policies/global_policy.rb

17 lines
365 B
Ruby
Raw Normal View History

2016-08-16 19:29:19 -04:00
class GlobalPolicy < BasePolicy
def rules
return unless @user
2016-08-30 14:14:07 -04:00
2016-08-16 19:29:19 -04:00
can! :create_group if @user.can_create_group
can! :read_users_list
unless @user.blocked? || @user.internal?
2017-02-28 16:19:52 -05:00
can! :log_in unless @user.access_locked?
can! :access_api
can! :access_git
2017-02-28 18:24:04 -05:00
can! :receive_notifications
can! :use_quick_actions
end
2016-08-16 19:29:19 -04:00
end
end