mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
Fix default role assigning on projects create through the dashboard [SCI-8728]
This commit is contained in:
parent
c71d8df470
commit
0ea3a10d26
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,10 @@ class CreateProjectService
|
||||||
@params[:created_by] = @user
|
@params[:created_by] = @user
|
||||||
@params[:last_modified_by] = @user
|
@params[:last_modified_by] = @user
|
||||||
|
|
||||||
@project = @team.projects.create!(@params)
|
@project = @team.projects.build(@params)
|
||||||
|
@project.default_public_user_role ||= UserRole.find_predefined_viewer_role if @project.visible?
|
||||||
|
@project.save!
|
||||||
|
|
||||||
create_project_activity
|
create_project_activity
|
||||||
end
|
end
|
||||||
@project
|
@project
|
||||||
|
|
Loading…
Reference in a new issue