diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-11 16:44:33 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-11 16:44:33 +0300 |
commit | 71ae01fefe62caf396640affb8ca618fe68db5a0 (patch) | |
tree | 91ffeda13f1fee71bfec0c9b3ffb4cb99cd2f096 /app/models/deploy_key.rb | |
parent | 38fbcb99dba61cfae1b788e0ec947911c4d14dd8 (diff) |
Add more tests and fix write to project check
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 2c525d4cd7a..503398f5cca 100644 --- a/app/models/deploy_key.rb +++ b/app/models/deploy_key.rb @@ -20,4 +20,8 @@ class DeployKey < Key def destroyed_when_orphaned? self.private? end + + def can_push_to?(project) + can_push? && projects.include?(project) + end end |