Commit c63641ea authored by Kamil Trzcinski's avatar Kamil Trzcinski

Filter update params

parent ec09883b
......@@ -61,15 +61,25 @@ class Projects::ClustersController < Projects::ApplicationController
end
def update_params
if cluster.managed?
params.require(:cluster).permit(
:enabled,
platform_kubernetes_attributes: [
:namespace
]
)
else
params.require(:cluster).permit(
:enabled,
:name,
platform_kubernetes_attributes: [
:namespace,
:api_url,
:token,
:ca_cert
])
:ca_cert,
:namespace
]
)
end
end
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