diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-12 18:13:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-12 18:13:54 +0300 |
commit | 462b603802e45891ac5152aea8cbc9298d7d4a53 (patch) | |
tree | de7e03460744491c0d7dcc6e3340272f833fb3b7 /app/models/group.rb | |
parent | da646aac6c559584f63d1fc06132d7351abcfac6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 28b945f7c03..cacfe202fd2 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -627,14 +627,13 @@ class Group < Namespace end end - def group_member(user) + def member(user) if group_members.loaded? group_members.find { |gm| gm.user_id == user.id } else group_members.find_by(user_id: user) end end - alias_method :resource_member, :group_member def highest_group_member(user) GroupMember.where(source_id: self_and_ancestors_ids, user_id: user.id).order(:access_level).last |