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

policy_actor.rb « concerns « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 406677d7b568d7b4afb1ff470496eef4246ff5a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true

# Include this module if we want to pass something else than the user to
# check policies. This defines several methods which the policy checker
# would call and check.
module PolicyActor
  extend ActiveSupport::Concern

  def blocked?
    false
  end

  def admin?
    false
  end

  def external?
    false
  end

  def internal?
    false
  end

  def access_locked?
    false
  end

  def required_terms_not_accepted?
    false
  end

  def can_create_group
    false
  end

  def alert_bot?
    false
  end
end

PolicyActor.prepend_if_ee('EE::PolicyActor')