mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 21:20:08 -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:
@@ -55,7 +55,10 @@
|
|||||||
min-height: 40px;
|
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;
|
height:15px;
|
||||||
color: @default-interface-txt;
|
color: @default-interface-txt;
|
||||||
background-color: @default-list-header-bg;
|
background-color: @default-list-header-bg;
|
||||||
|
|||||||
@@ -334,6 +334,7 @@ export function UsersEdit($scope, $rootScope, $location,
|
|||||||
$scope.not_ldap_user = !$scope.ldap_user;
|
$scope.not_ldap_user = !$scope.ldap_user;
|
||||||
master.ldap_user = $scope.ldap_user;
|
master.ldap_user = $scope.ldap_user;
|
||||||
$scope.socialAuthUser = (data.auth.length > 0) ? true : false;
|
$scope.socialAuthUser = (data.auth.length > 0) ? true : false;
|
||||||
|
$scope.external_account = data.external_account;
|
||||||
|
|
||||||
$scope.user_type = $scope.user_type_options[0];
|
$scope.user_type = $scope.user_type_options[0];
|
||||||
$scope.is_system_auditor = false;
|
$scope.is_system_auditor = false;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default
|
|||||||
label: 'Username',
|
label: 'Username',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
awRequiredWhen: {
|
awRequiredWhen: {
|
||||||
reqExpression: "not_ldap_user",
|
reqExpression: "not_ldap_user && !external_account",
|
||||||
init: true
|
init: true
|
||||||
},
|
},
|
||||||
autocomplete: false
|
autocomplete: false
|
||||||
@@ -69,7 +69,7 @@ export default
|
|||||||
label: 'Password',
|
label: 'Password',
|
||||||
type: 'sensitive',
|
type: 'sensitive',
|
||||||
hasShowInputButton: true,
|
hasShowInputButton: true,
|
||||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
ngShow: 'ldap_user == false && socialAuthUser === false && external_account === null',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
ngChange: "clearPWConfirm('password_confirm')",
|
ngChange: "clearPWConfirm('password_confirm')",
|
||||||
@@ -80,7 +80,7 @@ export default
|
|||||||
label: 'Confirm Password',
|
label: 'Confirm Password',
|
||||||
type: 'sensitive',
|
type: 'sensitive',
|
||||||
hasShowInputButton: true,
|
hasShowInputButton: true,
|
||||||
ngShow: 'ldap_user == false && socialAuthUser === false',
|
ngShow: 'ldap_user == false && socialAuthUser === false && external_account === null',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
awPassMatch: true,
|
awPassMatch: true,
|
||||||
|
|||||||
@@ -1487,6 +1487,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
"ng-show='is_system_auditor'>Auditor</span>";
|
"ng-show='is_system_auditor'>Auditor</span>";
|
||||||
html+= "<span class=\"Form-title--is_ldap_user\" "+
|
html+= "<span class=\"Form-title--is_ldap_user\" "+
|
||||||
"ng-show='ldap_user'>LDAP</span>";
|
"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>\n";
|
||||||
html += "<div class=\"Form-header--fields\">";
|
html += "<div class=\"Form-header--fields\">";
|
||||||
|
|||||||
Reference in New Issue
Block a user