diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-03-28 18:54:15 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-03-28 18:54:15 +0200 |
commit | 7bca902a23d0cccaa3bce422fce7fdc71e722db4 (patch) | |
tree | f8ce7b3ae1e7982a0a188bc22d4f65dba9035ee1 /app/models/deploy_key.rb | |
parent | 59d910f2a136a52748326977fcefe2ec16c35d09 (diff) | |
download | gitlab-ce-7bca902a23d0cccaa3bce422fce7fdc71e722db4.tar.gz |
Fall back on ghost user when deploy key user is not set
Diffstat (limited to 'app/models/deploy_key.rb')
-rw-r--r-- | app/models/deploy_key.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/deploy_key.rb b/app/models/deploy_key.rb index c2e0a5fa126..89a74b7dcb1 100644 --- a/app/models/deploy_key.rb +++ b/app/models/deploy_key.rb @@ -27,6 +27,10 @@ class DeployKey < Key self.private? end + def user + super || User.ghost + end + def has_access_to?(project) deploy_keys_project_for(project).present? end |