Allow IAM policy to manage user access to machines & machine groups
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:
@@ -122,6 +122,8 @@ class PolicyResource extends CRUDBase {
|
||||
options: [
|
||||
{display: 'Application', value: 'application'},
|
||||
{display: 'API Scope', value: 'api_scope'},
|
||||
{display: 'Computer', value: 'machine'},
|
||||
{display: 'Computer Group', value: 'machine_group'},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -148,6 +150,30 @@ class PolicyResource extends CRUDBase {
|
||||
},
|
||||
if: (form_data) => form_data.target_type === 'api_scope'
|
||||
},
|
||||
{
|
||||
name: 'Target',
|
||||
field: 'target_id',
|
||||
required: true,
|
||||
type: 'select.dynamic',
|
||||
options: {
|
||||
resource: 'ldap/Machine',
|
||||
display: machine => `${machine.name}${machine.host_name ? ' (' + machine.host_name + ')' : ''}`,
|
||||
value: 'id',
|
||||
},
|
||||
if: (form_data) => form_data.target_type === 'machine'
|
||||
},
|
||||
{
|
||||
name: 'Target',
|
||||
field: 'target_id',
|
||||
required: true,
|
||||
type: 'select.dynamic',
|
||||
options: {
|
||||
resource: 'ldap/MachineGroup',
|
||||
display: group => `${group.name} (${(group.machine_ids || []).length} computers)`,
|
||||
value: 'id',
|
||||
},
|
||||
if: (form_data) => form_data.target_type === 'machine_group'
|
||||
},
|
||||
],
|
||||
/*handlers: {
|
||||
insert: {
|
||||
|
||||
Reference in New Issue
Block a user