Commit Graph
37 Commits
Author SHA1 Message Date
Cameron PereraandRandall Morey 84077b5d8a Icu 6800 api is secret data modeling (#1448)
* refactor: 💡 Add isSecret option for model attributes

Move secret attribute logic to application serializer that will remove
the key/value pair if the value is null or empty

✅ Closes: ICU-6800

* refactor: 💡 Add isSecret option to credential store token

* Update addons/api/addon/serializers/credential.js

Remove unneeded serialize method for credentials

Co-authored-by: Randall Morey <randall@randallmorey.com>

* refactor: 💡 add type check for serializing secret attributes

Co-authored-by: Randall Morey <randall@randallmorey.com>
2022-11-14 14:45:53 -06:00
Randall Morey bdabcc119e Refactor base scope fragment (#1166)
* refactor: 💡 migrate managed-group off fragments

* refactor: 💡 migrate credential-store off fragments

* refactor: 💡 migrate credential-library off fragments

* refactor: 💡 migrate account off fragments

* refactor: 💡 convert base model scope field to simple attr

* fix: 🐛 skip broken test
2022-07-18 11:30:53 -07:00
Zhihe Li 1b9f774937 fix: 🐛 Use more common hasOwnProperty and don't modify payload (#1112) 2022-05-19 17:52:10 -04:00
Zhihe Li 97196368cb Fix Users page not updating fields correctly (#1105)
* fix: 🐛 Normalize update responses to track removed fields

✅ Closes: ICU-4189
2022-05-12 10:16:14 -04:00
Randall Morey 93fd52954f chore: 🤖 explicitly set secrets to null when missing 2022-02-14 11:50:39 -05:00
Randall Morey d53cfbcc33 refactor: 💡 simplify nested fields normalization 2022-02-14 11:14:52 -05:00
Carlos Alcaide Corvo e1282bb870 Fix conditional to check for undefined 2022-02-10 11:47:30 -08:00
Carlos Alcaide Corvo b33a4d0b1d refactor: 💡 Refactor app normalize and host catalog normalize
Refactor app normalize to deal with nestedAttributes and nestedSecrets
as expected, before it was not working as expected. Refactor the host
catalog normalize method. Add normalize test on host catalog to validate
changes on normalize methods.
2022-02-10 11:43:30 -08:00
Randall Morey 712607cb0c fix: variable name 2022-01-21 15:26:27 -05:00
Randall Morey 44ea5e329b chore: always delete nested secrets from main payload 2022-01-21 15:24:38 -05:00
Randall Morey cd02f6aec3 chore: add isNestedSecret support 2022-01-21 15:22:59 -05:00
Randall Morey d8aaddfcca chore: convert writeOnce to writeOnly 2022-01-21 12:43:45 -05:00
Randall Morey cd60c0bbc3 chore: add writeOnce field support 2022-01-20 17:20:24 -05:00
Randall Morey 121129ffd2 fix: 🐛 include nulls 2022-01-19 12:16:57 -05:00
Randall Morey ac14e8786d feat: 🎸 support isNestedAttribute in models 2022-01-18 13:44:27 -05:00
Randall Morey fbf39b3bba refactor: 💡 upgrade addons/api to Ember 3.24 2021-03-04 15:47:38 -05:00
Randall Morey ce08ae3001 chore: 🤖 empty strings should be serialized as null 2020-10-07 10:53:53 -04:00
Susmitha Girumala 0a1eafe55e refactor: Refactor seralizeScopeID from models to serializers 2020-09-21 18:23:32 -04:00
Susmitha Girumala aca96d6dd8 test: Refactor 'nestedResource' to 'serializeScopeID' 2020-09-21 15:03:23 -04:00
Susmitha Girumala fe2232b320 fix: Do not serialize scope_id for nested resources
Nested resources currently are accounts, host-sets, and hosts.
2020-09-21 14:42:19 -04:00
Susmitha Girumala ec870acba8 style: format addons/api 2020-09-16 14:29:02 -04:00
Randall Morey 7d5bef4440 fix: 🐛 add support for emptyArrayIfMissing on model attrs 2020-09-12 10:42:23 -04:00
Randall Morey ab608c7544 refactor: 💡 serialize scope_id by default 2020-09-10 18:32:17 -04:00
Randall Morey bce27df1f4 refactor: 💡 update to unprefixed target pathing 2020-09-03 14:35:05 -04:00
Randall Morey cd4f50f868 chore: 🤖 all resources should have a version 2020-08-21 08:55:07 -04:00
Randall Morey b7996f6271 fix: normalize embedded scope IDs and ensure scope resources do not receive scope-prefixed URLs like other resources do 2020-07-23 10:34:31 -04:00
Randall Morey 3d432950d6 refactor: represent scopes as fragments and special-case serialization of parent IDs on scopes themselves 2020-07-22 11:47:33 -04:00
Randall Morey d9795daf1b refactor: relationships are expressed as objects {id} rather than string ID fields 2020-07-16 18:45:08 -04:00
Randall Morey 433ae8c022 refactor: change parentScope to scope 2020-07-16 18:18:25 -04:00
Randall Morey d847ede742 chore: do not serialize scope or parentScope into request payloads 2020-07-16 12:54:29 -04:00
Randall Morey ae018db410 chore: rip out org and project models 2020-07-15 17:17:11 -04:00
Randall Morey eb4b29ac1b chore: 🤖 introduce Scope model with self relationships 2020-07-14 18:47:35 -04:00
Randall Morey 28f28d96f4 chore: 🤖 do not serialize fields with name disabled 2020-05-21 12:21:52 -04:00
Randall Morey ebdb938ca6 chore: 🤖 improve adapters and serializers to match API 2020-05-21 09:22:56 -04:00
Randall Morey b0921724ba chore: 🤖 add normalizer for singluar unrooted responses 2020-05-20 15:39:47 -04:00
Randall Morey bfb79a51c1 chore: 🤖 migrate to ember-copy addon because of deprecations 2020-05-19 16:51:45 -04:00
Randall Morey ae535c607e chore: 🤖 setup API concerns for project resource 2020-05-19 16:33:31 -04:00