Commit a5383054 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use ActiveSupport::Concern

parent 15de364e
module EE
module API
module JobArtifacts
def self.prepended(api)
api.module_eval do
helpers do
def authorize_download_artifacts!
super
check_cross_project_pipelines_feature!
end
extend ActiveSupport::Concern
prepended do
helpers do
def authorize_download_artifacts!
super
check_cross_project_pipelines_feature!
end
def check_cross_project_pipelines_feature!
if job_token_authentication? && !@project.feature_available?(:cross_project_pipelines)
not_found!('Project')
end
def check_cross_project_pipelines_feature!
if job_token_authentication? && !@project.feature_available?(:cross_project_pipelines)
not_found!('Project')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment