mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
assert org.auditor can read org credentials
This commit is contained in:
@@ -64,6 +64,17 @@ def test_credential_access_superuser():
|
|||||||
assert access.can_change(credential, None)
|
assert access.can_change(credential, None)
|
||||||
assert access.can_delete(credential)
|
assert access.can_delete(credential)
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
def test_credential_access_auditor(credential, organization_factory):
|
||||||
|
objects = organization_factory("org_cred_auditor",
|
||||||
|
users=["user1"],
|
||||||
|
roles=['org_cred_auditor.auditor_role:user1'])
|
||||||
|
credential.organization = objects.organization
|
||||||
|
credential.save()
|
||||||
|
|
||||||
|
access = CredentialAccess(objects.users.user1)
|
||||||
|
assert access.can_read(credential)
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_credential_access_admin(user, team, credential):
|
def test_credential_access_admin(user, team, credential):
|
||||||
u = user('org-admin', False)
|
u = user('org-admin', False)
|
||||||
|
|||||||
Reference in New Issue
Block a user