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
d41b05cf
Commit
d41b05cf
authored
Aug 12, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conflict resolving
parent
9e931575
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
lib/gitlab/checks/change_access.rb
lib/gitlab/checks/change_access.rb
+2
-20
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+0
-2
No files found.
lib/gitlab/checks/change_access.rb
View file @
d41b05cf
...
...
@@ -87,32 +87,14 @@ module Gitlab
Checks
::
MatchingMergeRequest
.
new
(
@newrev
,
@branch_name
,
@project
).
match?
end
def
branch_name
(
ref
)
ref
=
@ref
.
to_s
if
Gitlab
::
Git
.
branch_ref?
(
ref
)
Gitlab
::
Git
.
ref_name
(
ref
)
else
nil
end
end
def
tag_name
(
ref
)
ref
=
@ref
.
to_s
if
Gitlab
::
Git
.
tag_ref?
(
ref
)
Gitlab
::
Git
.
ref_name
(
ref
)
else
nil
end
end
def
push_rule_check
return
unless
project
.
push_rule
&&
@newrev
&&
@oldrev
push_rule
=
project
.
push_rule
# Prevent tag removal
if
tag_name
(
@ref
)
if
push_rule
.
deny_delete_tag
&&
protected_tag?
(
tag_name
(
@ref
))
&&
Gitlab
::
Git
.
blank_ref?
(
@newrev
)
if
Gitlab
::
Git
.
tag_name
(
@ref
)
if
push_rule
.
deny_delete_tag
&&
protected_tag?
(
Gitlab
::
Git
.
tag_name
(
@ref
))
&&
Gitlab
::
Git
.
blank_ref?
(
@newrev
)
"You can not delete tag"
end
else
...
...
lib/gitlab/git_access.rb
View file @
d41b05cf
...
...
@@ -100,8 +100,6 @@ module Gitlab
return
build_status_object
(
false
,
message
)
end
changes
=
changes
.
lines
if
changes
.
kind_of?
(
String
)
changes_list
=
Gitlab
::
ChangesList
.
new
(
changes
)
# Iterate over all changes to find if user allowed all of them to be applied
...
...
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