Class: GroupMember

Inherits:
Member
  • Object
show all
Defined in:
app/models/members/group_member.rb

Overview

Schema Information

Table name: members

id                 :integer          not null, primary key
access_level       :integer          not null
source_id          :integer          not null
source_type        :string           not null
user_id            :integer
notification_level :integer          not null
type               :string
created_at         :datetime
updated_at         :datetime
created_by_id      :integer
invite_email       :string
invite_token       :string
invite_accepted_at :datetime

Constant Summary collapse

SOURCE_TYPE =
'Namespace'

Constants included from Gitlab::Access

Gitlab::Access::DEVELOPER, Gitlab::Access::GUEST, Gitlab::Access::MASTER, Gitlab::Access::OWNER, Gitlab::Access::PROTECTION_DEV_CAN_PUSH, Gitlab::Access::PROTECTION_FULL, Gitlab::Access::PROTECTION_NONE, Gitlab::Access::REPORTER

Instance Attribute Summary

Attributes inherited from Member

#raw_invite_token

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Member

#accept_invite!, add_user, #create_notification_setting, #decline_invite!, find_by_invite_token, #generate_invite_token, #generate_invite_token!, #invite?, #notification_setting, #resend_invite, user_for_id

Methods included from Gitlab::Access

all_values, #human_access, options, options_with_owner, #owner?, protection_options, protection_values, sym_options, values

Class Method Details

.access_level_rolesObject


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

def self.access_level_roles
  Gitlab::Access.options_with_owner
end

Instance Method Details

#access_fieldObject


41
42
43
# File 'app/models/members/group_member.rb', line 41

def access_field
  access_level
end

#groupObject


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

def group
  source
end