Reduce diff with EE in Groups::UpdateService

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-02-04 18:42:53 +01:00
parent 7ffbfeb1f7
commit 4e7dd94d78
No known key found for this signature in database
GPG key ID: 98DFFD1C0C62B70B

View file

@ -11,6 +11,8 @@ module Groups
return false unless valid_share_with_group_lock_change? return false unless valid_share_with_group_lock_change?
before_assignment_hook(group, params)
group.assign_attributes(params) group.assign_attributes(params)
begin begin
@ -28,6 +30,10 @@ module Groups
private private
def before_assignment_hook(group, params)
# overriden in EE
end
def after_update def after_update
if group.previous_changes.include?(:visibility_level) && group.private? if group.previous_changes.include?(:visibility_level) && group.private?
# don't enqueue immediately to prevent todos removal in case of a mistake # don't enqueue immediately to prevent todos removal in case of a mistake