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
359c039b
Commit
359c039b
authored
May 05, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Git access check.
parent
fdcf8732
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/gitlab/git_access.rb
lib/gitlab/git_access.rb
+7
-3
No files found.
lib/gitlab/git_access.rb
View file @
359c039b
...
...
@@ -102,9 +102,8 @@ module Gitlab
end
def
user_push_access_check
(
changes
)
if
::
License
.
block_changes?
message
=
::
LicenseHelper
.
license_message
(
signed_in:
true
,
is_admin:
(
user
&&
user
.
is_admin?
))
return
build_status_object
(
false
,
message
)
unless
user
&&
user_allowed?
return
build_status_object
(
false
,
"You don't have access"
)
end
if
changes
.
blank?
...
...
@@ -114,6 +113,11 @@ module Gitlab
unless
project
.
repository
.
exists?
return
build_status_object
(
false
,
"Repository does not exist"
)
end
if
::
License
.
block_changes?
message
=
::
LicenseHelper
.
license_message
(
signed_in:
true
,
is_admin:
(
user
&&
user
.
is_admin?
))
return
build_status_object
(
false
,
message
)
end
changes
=
changes
.
lines
if
changes
.
kind_of?
(
String
)
...
...
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