给projects项目新建的时候添加创建人
This commit is contained in:
parent
437fc243ad
commit
d7c550b15b
|
@ -180,6 +180,7 @@ class ProjectsController < ApplicationController
|
|||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
@project.organization_id = params[:organization_id]
|
||||
@project.user_id = User.current.id
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
|
|
Loading…
Reference in New Issue