Clean up IAM to allow relations w/o explicit definitions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-04-15 09:55:25 -05:00
parent a7ed5d09f1
commit 5645e8fae1
2 changed files with 36 additions and 11 deletions

View File

@@ -20,12 +20,6 @@ class MachineModel extends Model {
}
async to_api() {
let iam_filter = `(|(iamTarget=${this.id})`
for ( const group of (await this.groups()) ) {
iam_filter += `(iamTarget=${group.id})`
}
iam_filter += ')'
return {
id: this.id,
name: this.name,
@@ -33,7 +27,7 @@ class MachineModel extends Model {
host_name: this.host_name,
location: this.location,
ldap_visible: this.ldap_visible,
iam_filter,
iam_filter: `(|(iamTarget=${this.id}))`,
}
}