diff options
author | Stan Hu <stanhu@gmail.com> | 2017-11-08 16:21:39 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-08 16:21:39 +0000 |
commit | 0232450c8aee08a656275caf7b990e0bcbbb1cf4 (patch) | |
tree | 9817869e4ed30b9ab05480c8b3daa6776148e557 /lib/gitlab/lfs_token.rb | |
parent | 9e294180f29ec7ec9e9734a65b2b5d3124d657e4 (diff) | |
download | gitlab-ce-0232450c8aee08a656275caf7b990e0bcbbb1cf4.tar.gz |
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.rb | 4 |
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 |