BigW Consortium Gitlab

Commit 7019a19b by James Lopez

cleanup namespace check now done by service

parent 89227126
class Import::GitlabProjectsController < Import::BaseController
before_action :verify_gitlab_project_import_enabled
before_action :verify_project_and_namespace_access
def new
@namespace_id = project_params[:namespace_id]
......@@ -36,16 +35,6 @@ class Import::GitlabProjectsController < Import::BaseController
project_params[:file].respond_to?(:read)
end
def verify_project_and_namespace_access
unless namespace_access?
render_403
end
end
def namespace_access?
can?(current_user, :create_projects, Namespace.find(project_params[:namespace_id]))
end
def verify_gitlab_project_import_enabled
render_404 unless gitlab_project_import_enabled?
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