mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Only show cred type test button to superusers.
Without a credential instance, plugin tests go through the credential type (not credential) api. Since this endpoint is for superusers only, we hide the test button when non-superusers are adding a new external credential.
This commit is contained in:
parent
68a6984fcd
commit
540f8ab7d6
@ -156,7 +156,13 @@ function AddEditCredentialsController (
|
||||
if (credential.get('credential_type') === credentialType.get('id')) {
|
||||
vm.inputSources.items = credential.get('related.input_sources.results');
|
||||
}
|
||||
vm.isTestable = (isEditable && credentialType.get('kind') === 'external');
|
||||
|
||||
if (mode === 'add') {
|
||||
vm.isTestable = (models.me.get('is_superuser') && credentialType.get('kind') === 'external');
|
||||
} else {
|
||||
vm.isTestable = (isEditable && credentialType.get('kind') === 'external');
|
||||
}
|
||||
|
||||
vm.getSubmitData = getSubmitData;
|
||||
vm.checkForm = check;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user