diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-08 03:14:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-08 03:14:32 +0300 |
commit | c00e3e49ef33b44d5fe1bd34a396bb3dfe2cca65 (patch) | |
tree | e080a70e32591045f6f11a5c15d3fd4948bc3494 /app/models/group.rb | |
parent | f0b862a98200720a23fe3ed2807f4bb911f30d6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 19eac7af761..28b945f7c03 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -634,11 +634,16 @@ class Group < Namespace 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 end + def bots + users.project_bot + end + def related_group_ids [id, *ancestors.pluck(:id), |