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
a8ea2c18
Commit
a8ea2c18
authored
Apr 14, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change transfer service to use existing methods
parent
6b3a5384
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
app/services/projects/transfer_service.rb
app/services/projects/transfer_service.rb
+3
-15
No files found.
app/services/projects/transfer_service.rb
View file @
a8ea2c18
...
@@ -35,11 +35,9 @@ module Projects
...
@@ -35,11 +35,9 @@ module Projects
end
end
# Apply new namespace id and visibility level
# Apply new namespace id and visibility level
project
.
tap
do
|
p
|
project
.
namespace
=
new_namespace
p
.
namespace
=
new_namespace
project
.
visibility_level
=
new_namespace
.
visibility_level
unless
project
.
visibility_level_allowed_by_group?
setup_visibility_level
(
p
,
new_namespace
)
project
.
save!
p
.
save!
end
# Notifications
# Notifications
project
.
send_move_instructions
(
old_path
)
project
.
send_move_instructions
(
old_path
)
...
@@ -71,15 +69,5 @@ module Projects
...
@@ -71,15 +69,5 @@ module Projects
namespace
.
id
!=
project
.
namespace_id
&&
namespace
.
id
!=
project
.
namespace_id
&&
current_user
.
can?
(
:create_projects
,
namespace
)
current_user
.
can?
(
:create_projects
,
namespace
)
end
end
private
def
setup_visibility_level
(
project
,
new_namespace
)
return
unless
new_namespace
.
is_a?
(
Group
)
if
project
.
visibility_level
>
new_namespace
.
visibility_level
project
.
visibility_level
=
new_namespace
.
visibility_level
end
end
end
end
end
end
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