Module: GroupAPICompatibility

Extended by:
ActiveSupport::Concern
Included in:
Group
Defined in:
app/models/concerns/group_api_compatibility.rb

Overview

Add methods used by the groups API

Instance Method Summary collapse

Instance Method Details

#project_creation_level_strObject


7
8
9
# File 'app/models/concerns/group_api_compatibility.rb', line 7

def project_creation_level_str
  ::Gitlab::Access.project_creation_string_options.key(project_creation_level)
end

#project_creation_level_str=(value) ⇒ Object


11
12
13
# File 'app/models/concerns/group_api_compatibility.rb', line 11

def project_creation_level_str=(value)
  write_attribute(:project_creation_level, ::Gitlab::Access.project_creation_string_options.fetch(value))
end

#subgroup_creation_level_strObject


15
16
17
# File 'app/models/concerns/group_api_compatibility.rb', line 15

def subgroup_creation_level_str
  ::Gitlab::Access.subgroup_creation_string_options.key(subgroup_creation_level)
end

#subgroup_creation_level_str=(value) ⇒ Object


19
20
21
# File 'app/models/concerns/group_api_compatibility.rb', line 19

def subgroup_creation_level_str=(value)
  write_attribute(:subgroup_creation_level, ::Gitlab::Access.subgroup_creation_string_options.fetch(value))
end