|
|
@ -272,10 +272,6 @@ class PermittedParams |
|
|
|
:theme) |
|
|
|
:theme) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def membership |
|
|
|
|
|
|
|
params.require(:membership).permit(:project_id, role_ids: []) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def project(instance = nil) |
|
|
|
def project(instance = nil) |
|
|
|
whitelist = params.require(:project).permit(:name, |
|
|
|
whitelist = params.require(:project).permit(:name, |
|
|
|
:description, |
|
|
|
:description, |
|
|
@ -292,8 +288,7 @@ class PermittedParams |
|
|
|
whitelist.permit(enabled_module_names: []) |
|
|
|
whitelist.permit(enabled_module_names: []) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
whitelist.tap do |
|
|
|
unless params[:project][:custom_field_values].nil? |
|
|
|
break if params[:project][:custom_field_values].nil? |
|
|
|
|
|
|
|
whitelist[:custom_field_values] = params[:project][:custom_field_values] |
|
|
|
whitelist[:custom_field_values] = params[:project][:custom_field_values] |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -314,6 +309,9 @@ class PermittedParams |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def version |
|
|
|
def version |
|
|
|
|
|
|
|
# `version_settings_attributes` is from a plugin. Unfortunately as it stands |
|
|
|
|
|
|
|
# now it is less work to do it this way than have the plugin override this |
|
|
|
|
|
|
|
# method. We hopefully will change this in the future. |
|
|
|
params.require(:version).permit(:name, |
|
|
|
params.require(:version).permit(:name, |
|
|
|
:description, |
|
|
|
:description, |
|
|
|
:effective_date, |
|
|
|
:effective_date, |
|
|
@ -322,7 +320,8 @@ class PermittedParams |
|
|
|
:wiki_page_title, |
|
|
|
:wiki_page_title, |
|
|
|
:status, |
|
|
|
:status, |
|
|
|
:sharing, |
|
|
|
:sharing, |
|
|
|
:custom_field_value) |
|
|
|
:custom_field_value, |
|
|
|
|
|
|
|
version_settings_attributes: [:id, :display, :project]) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def comment |
|
|
|
def comment |
|
|
@ -389,6 +388,10 @@ class PermittedParams |
|
|
|
params.fetch(:reporting, {}).permit(:reporting_to_project_id, :reported_project_status_id, :reported_project_status_comment) |
|
|
|
params.fetch(:reporting, {}).permit(:reporting_to_project_id, :reported_project_status_id, :reported_project_status_comment) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def membership |
|
|
|
|
|
|
|
params.require(:membership).permit(*self.class.permitted_attributes[:membership]) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
protected |
|
|
|
protected |
|
|
|
|
|
|
|
|
|
|
|
def custom_field_values(key) |
|
|
|
def custom_field_values(key) |
|
|
@ -469,6 +472,9 @@ class PermittedParams |
|
|
|
:reassign_to_id], |
|
|
|
:reassign_to_id], |
|
|
|
group: [ |
|
|
|
group: [ |
|
|
|
:lastname], |
|
|
|
:lastname], |
|
|
|
|
|
|
|
membership: [ |
|
|
|
|
|
|
|
:project_id, |
|
|
|
|
|
|
|
role_ids: []], |
|
|
|
group_membership: [ |
|
|
|
group_membership: [ |
|
|
|
:membership_id, |
|
|
|
:membership_id, |
|
|
|
membership: [ |
|
|
|
membership: [ |
|
|
|