diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-08-16 13:24:25 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-08-16 13:24:25 +0000 |
commit | 555cdadee69cb65768cd3655830f980194e9e607 (patch) | |
tree | bd9740d8b98461d417e7ee87a0d5ade423279304 /app/models/project_auto_devops.rb | |
parent | ce18246c24040444646884a6a13e472ae83f74ee (diff) | |
download | gitlab-ce-555cdadee69cb65768cd3655830f980194e9e607.tar.gz |
Resolve "Enable Auto DevOps instance-wide on GitLab.com"
Diffstat (limited to 'app/models/project_auto_devops.rb')
-rw-r--r-- | app/models/project_auto_devops.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb index 155400d1a43..dc6736dd9cd 100644 --- a/app/models/project_auto_devops.rb +++ b/app/models/project_auto_devops.rb @@ -47,12 +47,8 @@ class ProjectAutoDevops < ActiveRecord::Base end def needs_to_create_deploy_token? - auto_devops_enabled? && + project.auto_devops_enabled? && !project.public? && !project.deploy_tokens.find_by(name: DeployToken::GITLAB_DEPLOY_TOKEN_NAME).present? end - - def auto_devops_enabled? - Gitlab::CurrentSettings.auto_devops_enabled? || enabled? - end end |