blob: 864be01a96d13b0f0f620b46e517927ab310dfac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# frozen_string_literal: true
module Members
module Groups
class CreatorService < Members::CreatorService
class << self
def cannot_manage_owners?(source, current_user)
source.max_member_access_for_user(current_user) < Gitlab::Access::OWNER
end
end
private
def can_create_new_member?
current_user.can?(:admin_group_member, member.group)
end
def can_update_existing_member?
current_user.can?(:update_group_member, member)
end
end
end
end
Members::Groups::CreatorService.prepend_mod_with('Members::Groups::CreatorService')
|