Welcome to mirror list, hosted at ThFree Co, Russian Federation.

global_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9be43a5037e9646ed045a54cad702e2557fd971 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class GlobalPolicy < BasePolicy
  def rules
    can! :read_users_list unless restricted_public_level?

    return unless @user

    can! :create_group if @user.can_create_group

    unless @user.blocked? || @user.internal?
      can! :log_in unless @user.access_locked?
      can! :access_api
      can! :access_git
      can! :receive_notifications
      can! :use_quick_actions
    end
  end
end