Commit 56c95fb6 authored by Mayra Cabrera's avatar Mayra Cabrera

Changes ci/lints controller to use authorize before action

Also includes a comment on Ci::Config regarding that's going to be
override by EE
parent b5b41d38
class Projects::Ci::LintsController < Projects::ApplicationController
before_action :ensure_user_access
before_action :authorize_create_pipeline!
def show
end
......@@ -24,8 +24,4 @@ class Projects::Ci::LintsController < Projects::ApplicationController
def yaml_processor_options
{ project: @project, sha: project.repository.commit.sha }
end
def ensure_user_access
return access_denied! unless can?(current_user, :create_pipeline, @project)
end
end
......@@ -4,6 +4,7 @@ module Gitlab
# Base GitLab CI Configuration facade
#
class Config
# EE would override this and utilize opts argument
def initialize(config, opts = {})
@config = Loader.new(config).load!
......
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