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

Use ActiveSupport::Concern

parent 15de364e
module EE module EE
module API module API
module JobArtifacts module JobArtifacts
def self.prepended(api) extend ActiveSupport::Concern
api.module_eval do
helpers do prepended do
def authorize_download_artifacts! helpers do
super def authorize_download_artifacts!
check_cross_project_pipelines_feature! super
end check_cross_project_pipelines_feature!
end
def check_cross_project_pipelines_feature! def check_cross_project_pipelines_feature!
if job_token_authentication? && !@project.feature_available?(:cross_project_pipelines) if job_token_authentication? && !@project.feature_available?(:cross_project_pipelines)
not_found!('Project') not_found!('Project')
end
end end
end 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