mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Disable edit mode cred form unless edit capability is true
This commit is contained in:
parent
024d148b7f
commit
da7896dbc4
@ -29,6 +29,7 @@ function AddEditCredentialsController (
|
|||||||
const isExternal = credentialType.get('kind') === 'external';
|
const isExternal = credentialType.get('kind') === 'external';
|
||||||
const mode = $state.current.name.startsWith('credentials.add') ? 'add' : 'edit';
|
const mode = $state.current.name.startsWith('credentials.add') ? 'add' : 'edit';
|
||||||
|
|
||||||
|
vm.isEditable = credential.get('summary_fields.user_capabilities.edit');
|
||||||
vm.mode = mode;
|
vm.mode = mode;
|
||||||
vm.strings = strings;
|
vm.strings = strings;
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ function AddEditCredentialsController (
|
|||||||
vm.form = credential.createFormSchema({ omit });
|
vm.form = credential.createFormSchema({ omit });
|
||||||
vm.form.disabled = !isEditable;
|
vm.form.disabled = !isEditable;
|
||||||
}
|
}
|
||||||
|
vm.form.disabled = !vm.isEditable;
|
||||||
|
|
||||||
vm.form._organization._disabled = !isOrgEditableByUser;
|
vm.form._organization._disabled = !isOrgEditableByUser;
|
||||||
// Only exists for permissions compatibility
|
// Only exists for permissions compatibility
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user