mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-06 08:21:50 -05:00
remove admin_role for users
This commit is contained in:
@@ -56,7 +56,6 @@ def test_get_roles_list_user(organization, inventory, team, get, user):
|
||||
assert Role.singleton(ROLE_SINGLETON_SYSTEM_ADMINISTRATOR).id in role_hash
|
||||
assert organization.admin_role.id in role_hash
|
||||
assert organization.member_role.id in role_hash
|
||||
assert this_user.admin_role.id in role_hash
|
||||
assert custom_role.id in role_hash
|
||||
|
||||
assert inventory.admin_role.id not in role_hash
|
||||
@@ -99,12 +98,12 @@ def test_cant_create_role(post, admin):
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_cant_delete_role(delete, admin):
|
||||
def test_cant_delete_role(delete, admin, inventory):
|
||||
"Ensure we can't delete roles through the api"
|
||||
# Some day we might want to do this, but until that is speced out, lets
|
||||
# ensure we don't slip up and allow this implicitly through some helper or
|
||||
# another
|
||||
response = delete(reverse('api:role_detail', kwargs={'pk': admin.admin_role.id}), admin)
|
||||
response = delete(reverse('api:role_detail', kwargs={'pk': inventory.admin_role.id}), admin)
|
||||
assert response.status_code == 405
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user