mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 14:38:00 -03:30
Fixes bug where user with edit permissions on a credential but no permissions on the credentials org would be denied access to the form in the UI.
This commit is contained in:
parent
01d77d5407
commit
dd5f25186b
@ -72,7 +72,7 @@ function AddEditCredentialsController (
|
||||
vm.form.credential_type._displayValue = credentialType.get('name');
|
||||
vm.isTestable = (isEditable && credentialType.get('kind') === 'external');
|
||||
|
||||
if (credential.get('related.input_sources.results.length' > 0)) {
|
||||
if (credential.get('related.input_sources.results').length > 0) {
|
||||
vm.form.credential_type._disabled = true;
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ function CredentialsResolve (
|
||||
return $q.all(promises)
|
||||
.then(models => {
|
||||
const typeId = models.credential.get('credential_type');
|
||||
const orgId = models.credential.get('organization');
|
||||
|
||||
Rest.setUrl(GetBasePath('credentials'));
|
||||
const params = { target_input_sources__target_credential: id };
|
||||
@ -48,7 +47,9 @@ function CredentialsResolve (
|
||||
|
||||
const dependents = {
|
||||
credentialType: new CredentialType('get', typeId),
|
||||
organization: new Organization('get', orgId),
|
||||
organization: new Organization('get', {
|
||||
resource: models.credential.get('summary_fields.organization')
|
||||
}),
|
||||
credentialInputSources: models.credential.extend('GET', 'input_sources'),
|
||||
sourceCredentials: sourceCredentialsPromise
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user