mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
introduce summary_fields for users, showing user_capabilities
This commit is contained in:
@@ -11,7 +11,6 @@ def test_inventory_group_host_can_add(inventory, alice, options):
|
||||
response = options(reverse('api:inventory_groups_list', args=[inventory.pk]), alice)
|
||||
assert 'POST' in response.data['actions']
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_inventory_group_host_can_not_add(inventory, bob, options):
|
||||
inventory.read_role.members.add(bob)
|
||||
@@ -20,3 +19,13 @@ def test_inventory_group_host_can_not_add(inventory, bob, options):
|
||||
assert 'POST' not in response.data['actions']
|
||||
response = options(reverse('api:inventory_groups_list', args=[inventory.pk]), bob)
|
||||
assert 'POST' not in response.data['actions']
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_user_list_can_add(org_member, org_admin, options):
|
||||
response = options(reverse('api:user_list'), org_admin)
|
||||
assert 'POST' in response.data['actions']
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_user_list_can_not_add(org_member, org_admin, options):
|
||||
response = options(reverse('api:user_list'), org_member)
|
||||
assert 'POST' not in response.data['actions']
|
||||
|
||||
Reference in New Issue
Block a user