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
6dba1bc0
Commit
6dba1bc0
authored
Dec 18, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make LfsRequest EE-compatible
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f9fd9b1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app/controllers/concerns/lfs_request.rb
app/controllers/concerns/lfs_request.rb
+6
-0
No files found.
app/controllers/concerns/lfs_request.rb
View file @
6dba1bc0
...
@@ -94,6 +94,7 @@ module LfsRequest
...
@@ -94,6 +94,7 @@ module LfsRequest
def
lfs_upload_access?
def
lfs_upload_access?
return
false
unless
project
.
lfs_enabled?
return
false
unless
project
.
lfs_enabled?
return
false
unless
has_authentication_ability?
(
:push_code
)
return
false
unless
has_authentication_ability?
(
:push_code
)
return
false
if
limit_exceeded?
lfs_deploy_token?
||
can?
(
user
,
:push_code
,
project
)
lfs_deploy_token?
||
can?
(
user
,
:push_code
,
project
)
end
end
...
@@ -121,4 +122,9 @@ module LfsRequest
...
@@ -121,4 +122,9 @@ module LfsRequest
def
has_authentication_ability?
(
capability
)
def
has_authentication_ability?
(
capability
)
(
authentication_abilities
||
[]).
include?
(
capability
)
(
authentication_abilities
||
[]).
include?
(
capability
)
end
end
# Overriden in EE
def
limit_exceeded?
false
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