Make CredentialType conditionally editable/readonly.

* CredentialTypes should not be editable *or* deletable if they're
  "managed_by_tower".
* CredentialTypes should not be deletable if they're in use by one or
  more Credentials.
* CredentialType.inputs should not be editable if they're in use by one
  or more Credentials.

see: #6077
This commit is contained in:
Ryan Petrello
2017-05-08 11:09:52 -04:00
parent 6728bb2315
commit 1568fddde1
4 changed files with 58 additions and 11 deletions

View File

@@ -809,8 +809,6 @@ class CredentialTypeAccess(BaseAccess):
- I'm a superuser:
I can change when:
- I'm a superuser and the type is not "managed by Tower"
I can change/delete when:
- I'm a superuser and the type is not "managed by Tower"
'''
model = CredentialType