Commit 1a8fc97b authored by Stan Hu's avatar Stan Hu

Merge branch 'xanf-prefer-except-over-only-in-imports-controller' into 'master'

Prefer `except` over `only` in ImportsController"

See merge request gitlab-org/gitlab!39893
parents fb47553c 949947a9
......@@ -5,10 +5,10 @@ class Projects::ImportsController < Projects::ApplicationController
include ImportUrlParams
# Authorize
before_action :authorize_admin_project!, only: [:new, :create]
before_action :authorize_admin_project!, except: :show
before_action :require_namespace_project_creation_permission, only: :show
before_action :require_no_repo, only: [:new, :create]
before_action :redirect_if_progress, only: [:new, :create]
before_action :require_no_repo, except: :show
before_action :redirect_if_progress, except: :show
before_action :redirect_if_no_import, only: :show
def new
......
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