Module: Gitlab::CrossProjectAccess::ClassMethods

Defined in:
lib/gitlab/cross_project_access/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#requires_cross_project_access(*args) ⇒ Object


6
7
8
9
10
11
12
13
14
15
# File 'lib/gitlab/cross_project_access/class_methods.rb', line 6

def requires_cross_project_access(*args)
  positive_condition, negative_condition, actions = extract_params(args)

  Gitlab::CrossProjectAccess.add_check(
    self,
    actions: actions,
    positive_condition: positive_condition,
    negative_condition: negative_condition
  )
end

#skip_cross_project_access_check(*args) ⇒ Object


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/gitlab/cross_project_access/class_methods.rb', line 17

def skip_cross_project_access_check(*args)
  positive_condition, negative_condition, actions = extract_params(args)

  Gitlab::CrossProjectAccess.add_check(
    self,
    actions: actions,
    positive_condition: positive_condition,
    negative_condition: negative_condition,
    skip: true
  )
end