Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-11-08 19:21:39 +0300
committerRémy Coutable <remy@rymai.me>2017-11-08 19:21:39 +0300
commit0232450c8aee08a656275caf7b990e0bcbbb1cf4 (patch)
tree9817869e4ed30b9ab05480c8b3daa6776148e557 /lib/gitlab/lfs_token.rb
parent9e294180f29ec7ec9e9734a65b2b5d3124d657e4 (diff)
Fix Error 500 when pushing LFS objects with a write deploy key
Diffstat (limited to 'lib/gitlab/lfs_token.rb')
-rw-r--r--lib/gitlab/lfs_token.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/lfs_token.rb b/lib/gitlab/lfs_token.rb
index 8e57ba831c5..ead5d566871 100644
--- a/lib/gitlab/lfs_token.rb
+++ b/lib/gitlab/lfs_token.rb
@@ -27,6 +27,10 @@ module Gitlab
end
end
+ def deploy_key_pushable?(project)
+ actor.is_a?(DeployKey) && actor.can_push_to?(project)
+ end
+
def user?
actor.is_a?(User)
end