BigW Consortium Gitlab

Commit 1ee19f04 by James Lopez

fixed permissions

parent 89fb5df5
...@@ -21,15 +21,11 @@ class Import::GitlabProjectsController < Import::BaseController ...@@ -21,15 +21,11 @@ class Import::GitlabProjectsController < Import::BaseController
private private
def verify_project_and_namespace_access def verify_project_and_namespace_access
unless namespace_access? && project_access? unless namespace_access?
render_403 render_403
end end
end end
def project_access?
can?(current_user, :admin_project, @project)
end
def namespace_access? def namespace_access?
current_user.can?(:create_projects, Namespace.find(project_params[:namespace_id])) current_user.can?(:create_projects, Namespace.find(project_params[:namespace_id]))
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