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