Made it so the credential organization field can't be changed

This makes it so the credential organizaiton field can't be changed
through the API (unless the user is a super user). This brings us into
alignment with the original intent.
This commit is contained in:
Akita Noek
2016-08-16 15:30:54 -04:00
parent fc7d2b6c4e
commit 9c5c09169e
3 changed files with 40 additions and 18 deletions

View File

@@ -160,7 +160,7 @@ def organization(instance):
@pytest.fixture
def credential():
return Credential.objects.create(kind='aws', name='test-cred')
return Credential.objects.create(kind='aws', name='test-cred', username='something', password='secret')
@pytest.fixture
def machine_credential():
@@ -168,7 +168,7 @@ def machine_credential():
@pytest.fixture
def org_credential(organization):
return Credential.objects.create(kind='aws', name='test-cred', organization=organization)
return Credential.objects.create(kind='aws', name='test-cred', username='something', password='secret', organization=organization)
@pytest.fixture
def inventory(organization):