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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 15:10:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 15:10:29 +0300
commit5564275a0b378298dc6281599cbfe71a937109ff (patch)
treea468e1e60046356410219c35c23a8a428c5e2c5e /app/models/project_deploy_token.rb
parentd87918510a866a5fcbbc2f899ad65c6938ebf5f5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_deploy_token.rb')
-rw-r--r--app/models/project_deploy_token.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_deploy_token.rb b/app/models/project_deploy_token.rb
index a55667496fb..0bce1c745f7 100644
--- a/app/models/project_deploy_token.rb
+++ b/app/models/project_deploy_token.rb
@@ -7,4 +7,8 @@ class ProjectDeployToken < ApplicationRecord
validates :deploy_token, presence: true
validates :project, presence: true
validates :deploy_token_id, uniqueness: { scope: [:project_id] }
+
+ def has_access_to?(requested_project)
+ requested_project == project
+ end
end