mirror of
https://github.com/ansible/awx.git
synced 2026-01-26 16:11:30 -03:30
Merge pull request #1138 from marshmalien/fix/auth_ldap_group_type_params_field
Add ldap_group_type_params codemirror field to LDAP forms
This commit is contained in:
commit
1f0889431c
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_REQUIRE_GROUP'
|
||||
|
||||
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_1_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_1_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_1_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_1_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_1_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_1_REQUIRE_GROUP'
|
||||
|
||||
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_2_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_2_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_2_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_2_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_2_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_2_REQUIRE_GROUP'
|
||||
|
||||
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_3_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_3_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_3_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_3_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_3_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_3_REQUIRE_GROUP'
|
||||
|
||||
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_4_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_4_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_4_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_4_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_4_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_4_REQUIRE_GROUP'
|
||||
|
||||
@ -54,6 +54,13 @@ export default ['i18n', function(i18n) {
|
||||
reset: 'AUTH_LDAP_5_GROUP_TYPE',
|
||||
ngOptions: 'group.label for group in AUTH_LDAP_5_GROUP_TYPE_options track by group.value',
|
||||
},
|
||||
AUTH_LDAP_5_GROUP_TYPE_PARAMS: {
|
||||
type: 'textarea',
|
||||
reset: 'AUTH_LDAP_5_GROUP_TYPE_PARAMS',
|
||||
codeMirror: true,
|
||||
rows: 6,
|
||||
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
|
||||
},
|
||||
AUTH_LDAP_5_REQUIRE_GROUP: {
|
||||
type: 'text',
|
||||
reset: 'AUTH_LDAP_5_REQUIRE_GROUP'
|
||||
|
||||
@ -338,7 +338,6 @@ export default [
|
||||
Wait('start');
|
||||
var payload = {};
|
||||
payload[key] = $scope.configDataResolve[key].default;
|
||||
|
||||
ConfigurationService.patchConfiguration(payload)
|
||||
.then(function() {
|
||||
$scope[key] = $scope.configDataResolve[key].default;
|
||||
@ -361,10 +360,13 @@ export default [
|
||||
else if($scope[key + '_field'].hasOwnProperty('codeMirror')){
|
||||
const isLdap = (key.indexOf("AUTH_LDAP") !== -1);
|
||||
|
||||
const isLdapGroupTypeParams = isLdap && (key.indexOf("GROUP_TYPE_PARAMS") !== -1);
|
||||
const isLdapUserSearch = isLdap && (key.indexOf("USER_SEARCH") !== -1);
|
||||
const isLdapGroupSearch = isLdap && (key.indexOf("GROUP_SEARCH") !== -1);
|
||||
|
||||
if (isLdapUserSearch || isLdapGroupSearch) {
|
||||
if (isLdapGroupTypeParams) {
|
||||
$scope[key] = JSON.stringify($scope.configDataResolve[key].default);
|
||||
} else if (isLdapUserSearch || isLdapGroupSearch) {
|
||||
$scope[key] = '[]';
|
||||
} else {
|
||||
$scope[key] = '{}';
|
||||
@ -456,7 +458,6 @@ export default [
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return payload;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user