Commit c63641ea authored by Kamil Trzcinski's avatar Kamil Trzcinski

Filter update params

parent ec09883b
...@@ -61,15 +61,25 @@ class Projects::ClustersController < Projects::ApplicationController ...@@ -61,15 +61,25 @@ class Projects::ClustersController < Projects::ApplicationController
end end
def update_params def update_params
params.require(:cluster).permit( if cluster.managed?
:enabled, params.require(:cluster).permit(
:name, :enabled,
platform_kubernetes_attributes: [ platform_kubernetes_attributes: [
:namespace, :namespace
:api_url, ]
:token, )
:ca_cert else
]) params.require(:cluster).permit(
:enabled,
:name,
platform_kubernetes_attributes: [
:api_url,
:token,
:ca_cert,
:namespace
]
)
end
end end
def authorize_update_cluster! def authorize_update_cluster!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment