diff options
| author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-04-05 15:49:18 +0200 |
|---|---|---|
| committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-06 21:20:16 -0500 |
| commit | 72220a99d1cdbcf8a914f9e765c43e63eaee2548 (patch) | |
| tree | 314df7454174092bee8f1ea83d6bda53d760959e /app/models | |
| parent | 171b2625b128e5954ce0a150a4fc923a22164e4e (diff) | |
| download | gitlab-ce-72220a99d1cdbcf8a914f9e765c43e63eaee2548.tar.gz | |
Support Deploy Tokens properly without hacking abilities
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/deploy_token.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/deploy_token.rb b/app/models/deploy_token.rb index b4df44d295a..c70d1457afb 100644 --- a/app/models/deploy_token.rb +++ b/app/models/deploy_token.rb @@ -29,6 +29,10 @@ class DeployToken < ActiveRecord::Base end def username - User.ghost.username + "gitlab+deploy-token-#{id}" + end + + def has_access_to?(project) + self.project == project end end |
