Icu 12933 updates to target model to support aliasing (#2214)

* feat: 🎸 target aliases association API, form creation
This commit is contained in:
Dharini Jeeva authored and GitHub committed 2024-04-05 16:35:23 -07:00
1 parent ac5110d94a
commit c8839d6db1
19 files changed
+197 -60

No files matched your search

+4 -4
View File
@@ -27,7 +27,7 @@ export default class RoleModel extends GeneratedRoleModel {
* see obvious. Instead, the application layer is expected to load referenced
* users and groups as needed.
*/
@attr('principal-array', {
@attr('array', {
readOnly: true,
emptyArrayIfMissing: true,
})
@@ -55,7 +55,7 @@ export default class RoleModel extends GeneratedRoleModel {
get userIDs() {
return this.principals
.filter(({ type }) => type === 'user')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**
@@ -65,7 +65,7 @@ export default class RoleModel extends GeneratedRoleModel {
get groupIDs() {
return this.principals
.filter(({ type }) => type === 'group')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**
@@ -75,7 +75,7 @@ export default class RoleModel extends GeneratedRoleModel {
get managedGroupIDs() {
return this.principals
.filter(({ type }) => type === 'managed group')
.map(({ principal_id }) => principal_id);
.map(({ id }) => id);
}
/**