ui: Explicitly remove properties that shouldn't be sent when saving (#6917)

pull/6918/head
John Cowen 2019-12-10 15:47:02 +00:00 committed by GitHub
parent 6827f05046
commit 5a88d4ebe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 3 deletions

View File

@ -25,14 +25,26 @@ export default Adapter.extend({
return request`
PUT /v1/acl/role?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
${serialized}
${{
Name: serialized.Name,
Description: serialized.Description,
Namespace: serialized.Namespace,
Policies: serialized.Policies,
ServiceIdentities: serialized.ServiceIdentities,
}}
`;
},
requestForUpdateRecord: function(request, serialized, data) {
return request`
PUT /v1/acl/role/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
${serialized}
${{
Name: serialized.Name,
Description: serialized.Description,
Namespace: serialized.Namespace,
Policies: serialized.Policies,
ServiceIdentities: serialized.ServiceIdentities,
}}
`;
},
requestForDeleteRecord: function(request, serialized, data) {

View File

@ -26,6 +26,14 @@ export default Adapter.extend({
requestForCreateRecord: function(request, serialized, data) {
return request`
PUT /v1/acl/token?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
${{
Description: serialized.Description,
Policies: serialized.Policies,
Roles: serialized.Roles,
ServiceIdentities: serialized.ServiceIdentities,
Local: serialized.Local,
}}
`;
},
requestForUpdateRecord: function(request, serialized, data) {
@ -45,7 +53,13 @@ export default Adapter.extend({
return request`
PUT /v1/acl/token/${data[SLUG_KEY]}?${{ [API_DATACENTER_KEY]: data[DATACENTER_KEY] }}
${serialized}
${{
Description: serialized.Description,
Policies: serialized.Policies,
Roles: serialized.Roles,
ServiceIdentities: serialized.ServiceIdentities,
Local: serialized.Local,
}}
`;
},
requestForDeleteRecord: function(request, serialized, data) {