Skip to content
Snippets Groups Projects
Commit 8e281c9e authored by Małgorzata Ksionek's avatar Małgorzata Ksionek
Browse files

Add cr remarks

parent 41af40d4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -327,9 +327,9 @@ class ProjectsController < Projects::ApplicationController
end
# rubocop: enable CodeReuse/ActiveRecord
 
def project_params(attributes: project_params_attributes)
def project_params(attributes: [])
params.require(:project)
.permit(attributes)
.permit(project_params_attributes + attributes)
end
 
def project_params_attributes
Loading
Loading
@@ -374,7 +374,7 @@ class ProjectsController < Projects::ApplicationController
end
 
def project_params_create_attributes
project_params_attributes << :namespace_id
[:namespace_id]
end
 
def custom_import_params
Loading
Loading
---
title: Disallow updating namespace during updating project
title: Disallow updating namespace when updating a project
merge_request:
author:
type: security
Loading
Loading
@@ -383,7 +383,7 @@ describe ProjectsController do
id: project.id,
project: params
}
end.not_to change {project.namespace}
end.not_to change {project.reload.namespace}
end
 
def update_project(**parameters)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment