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
facc22e2
Commit
facc22e2
authored
Jun 05, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee into fresh_ce_upstream
parents
949d43eb
9bdd60c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG-EE
CHANGELOG-EE
+1
-0
app/services/projects/update_mirror_service.rb
app/services/projects/update_mirror_service.rb
+1
-1
spec/services/projects/update_mirror_service_spec.rb
spec/services/projects/update_mirror_service_spec.rb
+10
-0
No files found.
CHANGELOG-EE
View file @
facc22e2
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 8.9.0 (unreleased)
v 8.9.0 (unreleased)
- Fix nil user handling in UpdateMirrorService
v 8.8.3
v 8.8.3
- Add standard web hook headers to Jenkins CI post. !374
- Add standard web hook headers to Jenkins CI post. !374
...
...
app/services/projects/update_mirror_service.rb
View file @
facc22e2
...
@@ -6,7 +6,7 @@ module Projects
...
@@ -6,7 +6,7 @@ module Projects
def
execute
def
execute
return
false
unless
project
.
mirror?
return
false
unless
project
.
mirror?
unless
c
urrent_user
.
can?
(
:push_code_to_protected_branches
,
project
)
unless
c
an?
(
current_user
,
:push_code_to_protected_branches
,
project
)
return
error
(
"The mirror user is not allowed to push code to all branches on this project."
)
return
error
(
"The mirror user is not allowed to push code to all branches on this project."
)
end
end
...
...
spec/services/projects/update_mirror_service_spec.rb
View file @
facc22e2
...
@@ -75,6 +75,16 @@ describe Projects::UpdateMirrorService do
...
@@ -75,6 +75,16 @@ describe Projects::UpdateMirrorService do
expect
(
result
[
:status
]).
to
eq
(
:error
)
expect
(
result
[
:status
]).
to
eq
(
:error
)
end
end
end
end
describe
"when no user is present"
do
let
(
:mirror_user
)
{
}
it
"fails"
do
result
=
subject
.
execute
expect
(
result
[
:status
]).
to
eq
(
:error
)
end
end
end
end
def
fetch_mirror
(
repository
)
def
fetch_mirror
(
repository
)
...
...
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