mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
assert org.auditor can read org credentials
This commit is contained in:
parent
b4148313a0
commit
dab3440275
@ -64,6 +64,17 @@ def test_credential_access_superuser():
|
||||
assert access.can_change(credential, None)
|
||||
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
|
||||
def test_credential_access_admin(user, team, credential):
|
||||
u = user('org-admin', False)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user