Class: ProjectGroupLink

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/project_group_link.rb

Overview

Schema Information

Table name: project_group_links

id           :integer          not null, primary key
project_id   :integer          not null
group_id     :integer          not null
created_at   :datetime
updated_at   :datetime
group_access :integer          default(30), not null

Constant Summary collapse

GUEST =
10
REPORTER =
20
DEVELOPER =
30
MASTER =
40

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.access_optionsObject


29
30
31
# File 'app/models/project_group_link.rb', line 29

def self.access_options
  Gitlab::Access.options
end

.default_accessObject


33
34
35
# File 'app/models/project_group_link.rb', line 33

def self.default_access
  DEVELOPER
end

Instance Method Details

#human_accessObject


37
38
39
# File 'app/models/project_group_link.rb', line 37

def human_access
  self.class.access_options.key(self.group_access)
end