Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r--app/services/projects/create_service.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index 1536f0a22b8..1d187b140ef 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -45,7 +45,7 @@ module Projects
if namespace_id
# Find matching namespace and check if it allowed
# for current user if namespace_id passed.
- unless current_user.can?(:create_projects, project_namespace)
+ unless current_user.can?(:create_projects, parent_namespace)
@project.namespace_id = nil
deny_namespace
return @project
@@ -136,7 +136,7 @@ module Projects
access_level: group_access_level)
end
- AuthorizedProjectUpdate::ProjectCreateWorker.perform_async(@project.id)
+ AuthorizedProjectUpdate::ProjectRecalculateWorker.perform_async(@project.id)
# AuthorizedProjectsWorker uses an exclusive lease per user but
# specialized workers might have synchronization issues. Until we
# compare the inconsistency rates of both approaches, we still run
@@ -227,14 +227,14 @@ module Projects
def extra_attributes_for_measurement
{
current_user: current_user&.name,
- project_full_path: "#{project_namespace&.full_path}/#{@params[:path]}"
+ project_full_path: "#{parent_namespace&.full_path}/#{@params[:path]}"
}
end
private
- def project_namespace
- @project_namespace ||= Namespace.find_by_id(@params[:namespace_id]) || current_user.namespace
+ def parent_namespace
+ @parent_namespace ||= Namespace.find_by_id(@params[:namespace_id]) || current_user.namespace
end
def create_from_template?