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:
Diffstat (limited to 'app/models/deploy_token.rb')
-rw-r--r--app/models/deploy_token.rb6
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