修复项目配置中“私有” “公开”问题
This commit is contained in:
parent
38ba47f8c8
commit
fcf34b5918
|
@ -189,6 +189,7 @@ class ProjectsController < ApplicationController
|
||||||
@project.organization_id = params[:organization_id]
|
@project.organization_id = params[:organization_id]
|
||||||
@project.user_id = User.current.id
|
@project.user_id = User.current.id
|
||||||
@project.project_new_type = params[:project_new_type]
|
@project.project_new_type = params[:project_new_type]
|
||||||
|
params[:project][:is_public] ? @project.is_public = 1 : @project.is_public = 0
|
||||||
if validate_parent_id && @project.save
|
if validate_parent_id && @project.save
|
||||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
@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
|
# Add current user as a project member if he is not admin
|
||||||
|
|
|
@ -86,7 +86,7 @@ class Message < ActiveRecord::Base
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
safe_attributes 'subject', 'content'
|
safe_attributes 'subject', 'content', 'reply_id'
|
||||||
safe_attributes 'board_id','locked', 'sticky',
|
safe_attributes 'board_id','locked', 'sticky',
|
||||||
:if => lambda {|message, user|
|
:if => lambda {|message, user|
|
||||||
if message.project
|
if message.project
|
||||||
|
|
Loading…
Reference in New Issue