mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Added adhoc_role to inventory and group, read_role to CustomInventorySource
This commit is contained in:
parent
fa10d562c1
commit
a361f14266
@ -114,9 +114,14 @@ class Inventory(CommonModel, ResourceMixin):
|
|||||||
role_name='Inventory User',
|
role_name='Inventory User',
|
||||||
role_description='May use this inventory, but not read sensitive portions or modify it',
|
role_description='May use this inventory, but not read sensitive portions or modify it',
|
||||||
)
|
)
|
||||||
|
adhoc_role = ImplicitRoleField(
|
||||||
|
role_name='Inventory Ad Hoc',
|
||||||
|
role_description='May execute ad hoc commands against this inventory',
|
||||||
|
)
|
||||||
execute_role = ImplicitRoleField(
|
execute_role = ImplicitRoleField(
|
||||||
role_name='Inventory Executor',
|
role_name='Inventory Executor',
|
||||||
role_description='May execute jobs against this inventory',
|
role_description='May execute jobs against this inventory',
|
||||||
|
parent_role='adhoc_role',
|
||||||
)
|
)
|
||||||
read_role = ImplicitRoleField(
|
read_role = ImplicitRoleField(
|
||||||
role_name='Read',
|
role_name='Read',
|
||||||
@ -534,9 +539,14 @@ class Group(CommonModelNameNotUnique, ResourceMixin):
|
|||||||
role_name='Inventory Group Updater',
|
role_name='Inventory Group Updater',
|
||||||
parent_role=['inventory.update_role', 'parents.update_role'],
|
parent_role=['inventory.update_role', 'parents.update_role'],
|
||||||
)
|
)
|
||||||
|
adhoc_role = ImplicitRoleField(
|
||||||
|
role_name='Inventory Ad Hoc',
|
||||||
|
parent_role=['inventory.adhoc_role', 'parents.adhoc_role'],
|
||||||
|
role_description='May execute ad hoc commands against this inventory',
|
||||||
|
)
|
||||||
execute_role = ImplicitRoleField(
|
execute_role = ImplicitRoleField(
|
||||||
role_name='Inventory Group Executor',
|
role_name='Inventory Group Executor',
|
||||||
parent_role=['inventory.execute_role', 'parents.execute_role'],
|
parent_role=['inventory.execute_role', 'parents.execute_role', 'adhoc_role'],
|
||||||
)
|
)
|
||||||
read_role = ImplicitRoleField(
|
read_role = ImplicitRoleField(
|
||||||
role_name='Inventory Group Executor',
|
role_name='Inventory Group Executor',
|
||||||
@ -1309,6 +1319,11 @@ class CustomInventoryScript(CommonModelNameNotUnique, ResourceMixin):
|
|||||||
role_description='May view but not modify this inventory',
|
role_description='May view but not modify this inventory',
|
||||||
parent_role='organization.auditor_role',
|
parent_role='organization.auditor_role',
|
||||||
)
|
)
|
||||||
|
read_role = ImplicitRoleField(
|
||||||
|
role_name='CustomInventory Read',
|
||||||
|
role_description='May view but not modify this inventory',
|
||||||
|
parent_role=['auditor_role', 'member_role', 'admin_role'],
|
||||||
|
)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse('api:inventory_script_detail', args=(self.pk,))
|
return reverse('api:inventory_script_detail', args=(self.pk,))
|
||||||
|
Loading…
Reference in New Issue
Block a user