Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
62c7d986
Commit
62c7d986
authored
Feb 04, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EE] Reduce diff with CE in Groups::UpdateService
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
71e6a91a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
app/services/groups/update_service.rb
app/services/groups/update_service.rb
+7
-4
ee/app/services/ee/groups/update_service.rb
ee/app/services/ee/groups/update_service.rb
+7
-0
No files found.
app/services/groups/update_service.rb
View file @
62c7d986
...
...
@@ -3,7 +3,6 @@
module
Groups
class
UpdateService
<
Groups
::
BaseService
include
UpdateVisibilityLevel
prepend
::
EE
::
Groups
::
UpdateService
# rubocop: disable Cop/InjectEnterpriseEditionModule
def
execute
reject_parent_id!
...
...
@@ -12,9 +11,7 @@ module Groups
return
false
unless
valid_share_with_group_lock_change?
# Repository size limit comes as MB from the view
limit
=
@params
.
delete
(
:repository_size_limit
)
group
.
repository_size_limit
=
Gitlab
::
Utils
.
try_megabytes_to_bytes
(
limit
)
if
limit
before_assignment_hook
(
group
,
params
)
group
.
assign_attributes
(
params
)
...
...
@@ -33,6 +30,10 @@ module Groups
private
def
before_assignment_hook
(
group
,
params
)
# overriden in EE
end
def
after_update
if
group
.
previous_changes
.
include?
(
:visibility_level
)
&&
group
.
private?
# don't enqueue immediately to prevent todos removal in case of a mistake
...
...
@@ -59,3 +60,5 @@ module Groups
end
end
end
Groups
::
UpdateService
.
prepend
(
EE
::
Groups
::
UpdateService
)
ee/app/services/ee/groups/update_service.rb
View file @
62c7d986
...
...
@@ -17,6 +17,13 @@ module EE
private
override
:before_assignment_hook
def
before_assignment_hook
(
group
,
params
)
# Repository size limit comes as MB from the view
limit
=
params
.
delete
(
:repository_size_limit
)
group
.
repository_size_limit
=
::
Gitlab
::
Utils
.
try_megabytes_to_bytes
(
limit
)
if
limit
end
def
changes_file_template_project_id?
return
false
unless
params
.
key?
(
:file_template_project_id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment