mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Hide password fields for radius/social auth users
on the users edit form, the password/confirm password field will be hidden similar to ldap. the username will not be required as well
This commit is contained in:
parent
fe64b0b478
commit
b99f9e2eee
@ -55,7 +55,10 @@
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.Form-title--is_superuser, .Form-title--is_system_auditor, .Form-title--is_ldap_user{
|
||||
.Form-title--is_superuser,
|
||||
.Form-title--is_system_auditor,
|
||||
.Form-title--is_ldap_user,
|
||||
.Form-title--is_external_account{
|
||||
height:15px;
|
||||
color: @default-interface-txt;
|
||||
background-color: @default-list-header-bg;
|
||||
|
||||
@ -334,6 +334,7 @@ export function UsersEdit($scope, $rootScope, $location,
|
||||
$scope.not_ldap_user = !$scope.ldap_user;
|
||||
master.ldap_user = $scope.ldap_user;
|
||||
$scope.socialAuthUser = (data.auth.length > 0) ? true : false;
|
||||
$scope.external_account = data.external_account;
|
||||
|
||||
$scope.user_type = $scope.user_type_options[0];
|
||||
$scope.is_system_auditor = false;
|
||||
|
||||
@ -46,7 +46,7 @@ export default
|
||||
label: 'Username',
|
||||
type: 'text',
|
||||
awRequiredWhen: {
|
||||
reqExpression: "not_ldap_user",
|
||||
reqExpression: "not_ldap_user && !external_account",
|
||||
init: true
|
||||
},
|
||||
autocomplete: false
|
||||
@ -69,7 +69,7 @@ export default
|
||||
label: 'Password',
|
||||
type: 'sensitive',
|
||||
hasShowInputButton: true,
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false && external_account === null',
|
||||
addRequired: true,
|
||||
editRequired: false,
|
||||
ngChange: "clearPWConfirm('password_confirm')",
|
||||
@ -80,7 +80,7 @@ export default
|
||||
label: 'Confirm Password',
|
||||
type: 'sensitive',
|
||||
hasShowInputButton: true,
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
||||
ngShow: 'ldap_user == false && socialAuthUser === false && external_account === null',
|
||||
addRequired: true,
|
||||
editRequired: false,
|
||||
awPassMatch: true,
|
||||
|
||||
@ -1487,6 +1487,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
||||
"ng-show='is_system_auditor'>Auditor</span>";
|
||||
html+= "<span class=\"Form-title--is_ldap_user\" "+
|
||||
"ng-show='ldap_user'>LDAP</span>";
|
||||
html+= "<span class=\"Form-title--is_external_account\" "+
|
||||
"ng-show='external_account'>{{external_account}}</span>";
|
||||
}
|
||||
html += "</div>\n";
|
||||
html += "<div class=\"Form-header--fields\">";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user