Reduce diff with EE in Groups::CreateService
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
04554d69bc
commit
073684e7a5
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,8 @@ module Groups
|
||||||
def execute
|
def execute
|
||||||
@group = Group.new(params)
|
@group = Group.new(params)
|
||||||
|
|
||||||
|
after_build_hook(@group, params)
|
||||||
|
|
||||||
unless can_use_visibility_level? && can_create_group?
|
unless can_use_visibility_level? && can_create_group?
|
||||||
return @group
|
return @group
|
||||||
end
|
end
|
||||||
|
@ -30,6 +32,10 @@ module Groups
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def after_build_hook(group, params)
|
||||||
|
# overriden in EE
|
||||||
|
end
|
||||||
|
|
||||||
def create_chat_team?
|
def create_chat_team?
|
||||||
Gitlab.config.mattermost.enabled && @chat_team && group.chat_team.nil?
|
Gitlab.config.mattermost.enabled && @chat_team && group.chat_team.nil?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue