Clean up IAM to allow relations w/o explicit definitions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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}))`,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user