mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
Signed-off-by: Klaas Demter <Klaas-@users.noreply.github.com>
This commit is contained in:
@@ -148,6 +148,16 @@ register(
|
|||||||
placeholder=['username', 'email'],
|
placeholder=['username', 'email'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
register(
|
||||||
|
'SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL',
|
||||||
|
field_class=fields.BooleanField,
|
||||||
|
default=False,
|
||||||
|
label=_('Use Email address for usernames'),
|
||||||
|
help_text=_('Enabling this setting will tell social auth to use the full Email as username instead of the full name'),
|
||||||
|
category=_('Authentication'),
|
||||||
|
category_slug='authentication',
|
||||||
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# LDAP AUTHENTICATION SETTINGS
|
# LDAP AUTHENTICATION SETTINGS
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ describe('<MiscAuthenticationDetail />', () => {
|
|||||||
SOCIAL_AUTH_ORGANIZATION_MAP: {},
|
SOCIAL_AUTH_ORGANIZATION_MAP: {},
|
||||||
SOCIAL_AUTH_TEAM_MAP: {},
|
SOCIAL_AUTH_TEAM_MAP: {},
|
||||||
SOCIAL_AUTH_USER_FIELDS: [],
|
SOCIAL_AUTH_USER_FIELDS: [],
|
||||||
|
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -79,6 +80,7 @@ describe('<MiscAuthenticationDetail />', () => {
|
|||||||
assertVariableDetail(wrapper, 'Social Auth Organization Map', '{}');
|
assertVariableDetail(wrapper, 'Social Auth Organization Map', '{}');
|
||||||
assertVariableDetail(wrapper, 'Social Auth Team Map', '{}');
|
assertVariableDetail(wrapper, 'Social Auth Team Map', '{}');
|
||||||
assertVariableDetail(wrapper, 'Social Auth User Fields', '[]');
|
assertVariableDetail(wrapper, 'Social Auth User Fields', '[]');
|
||||||
|
assertDetail(wrapper, 'Use Email address for usernames', 'Off');
|
||||||
assertDetail(
|
assertDetail(
|
||||||
wrapper,
|
wrapper,
|
||||||
'Allow External Users to Create OAuth2 Tokens',
|
'Allow External Users to Create OAuth2 Tokens',
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ function MiscAuthenticationEdit() {
|
|||||||
'SESSION_COOKIE_AGE',
|
'SESSION_COOKIE_AGE',
|
||||||
'SOCIAL_AUTH_ORGANIZATION_MAP',
|
'SOCIAL_AUTH_ORGANIZATION_MAP',
|
||||||
'SOCIAL_AUTH_TEAM_MAP',
|
'SOCIAL_AUTH_TEAM_MAP',
|
||||||
'SOCIAL_AUTH_USER_FIELDS'
|
'SOCIAL_AUTH_USER_FIELDS',
|
||||||
|
'SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL'
|
||||||
);
|
);
|
||||||
|
|
||||||
const authenticationData = {
|
const authenticationData = {
|
||||||
@@ -242,6 +243,10 @@ function MiscAuthenticationEdit() {
|
|||||||
name="SOCIAL_AUTH_USER_FIELDS"
|
name="SOCIAL_AUTH_USER_FIELDS"
|
||||||
config={authentication.SOCIAL_AUTH_USER_FIELDS}
|
config={authentication.SOCIAL_AUTH_USER_FIELDS}
|
||||||
/>
|
/>
|
||||||
|
<BooleanField
|
||||||
|
name="SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL"
|
||||||
|
config={authentication.SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL}
|
||||||
|
/>
|
||||||
{submitError && <FormSubmitError error={submitError} />}
|
{submitError && <FormSubmitError error={submitError} />}
|
||||||
{revertError && <FormSubmitError error={revertError} />}
|
{revertError && <FormSubmitError error={revertError} />}
|
||||||
</FormColumnLayout>
|
</FormColumnLayout>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const authenticationData = {
|
|||||||
SOCIAL_AUTH_ORGANIZATION_MAP: null,
|
SOCIAL_AUTH_ORGANIZATION_MAP: null,
|
||||||
SOCIAL_AUTH_TEAM_MAP: null,
|
SOCIAL_AUTH_TEAM_MAP: null,
|
||||||
SOCIAL_AUTH_USER_FIELDS: null,
|
SOCIAL_AUTH_USER_FIELDS: null,
|
||||||
|
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('<MiscAuthenticationEdit />', () => {
|
describe('<MiscAuthenticationEdit />', () => {
|
||||||
|
|||||||
@@ -859,6 +859,15 @@
|
|||||||
"read_only": false
|
"read_only": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL": {
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"label": "Use Email address for usernames",
|
||||||
|
"help_text": "Enabling this setting will tell social auth to use the full Email as username instead of the full name",
|
||||||
|
"category": "Authentication",
|
||||||
|
"category_slug": "authentication",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"SOCIAL_AUTH_OIDC_KEY": {
|
"SOCIAL_AUTH_OIDC_KEY": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"label": "OIDC Key",
|
"label": "OIDC Key",
|
||||||
@@ -4554,6 +4563,14 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL": {
|
||||||
|
"type": "boolean",
|
||||||
|
"label": "Use Email address for usernames",
|
||||||
|
"help_text": "Enabling this setting will tell social auth to use the full Email as username instead of the full name",
|
||||||
|
"category": "Authentication",
|
||||||
|
"category_slug": "authentication",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"SOCIAL_AUTH_OIDC_KEY": {
|
"SOCIAL_AUTH_OIDC_KEY": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"label": "OIDC Key",
|
"label": "OIDC Key",
|
||||||
|
|||||||
@@ -103,6 +103,7 @@
|
|||||||
"SOCIAL_AUTH_ORGANIZATION_MAP":null,
|
"SOCIAL_AUTH_ORGANIZATION_MAP":null,
|
||||||
"SOCIAL_AUTH_TEAM_MAP":null,
|
"SOCIAL_AUTH_TEAM_MAP":null,
|
||||||
"SOCIAL_AUTH_USER_FIELDS":null,
|
"SOCIAL_AUTH_USER_FIELDS":null,
|
||||||
|
"SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL":false,
|
||||||
"AUTH_LDAP_SERVER_URI":"ldap://ldap.example.com",
|
"AUTH_LDAP_SERVER_URI":"ldap://ldap.example.com",
|
||||||
"AUTH_LDAP_BIND_DN":"cn=eng_user1",
|
"AUTH_LDAP_BIND_DN":"cn=eng_user1",
|
||||||
"AUTH_LDAP_BIND_PASSWORD":"$encrypted$",
|
"AUTH_LDAP_BIND_PASSWORD":"$encrypted$",
|
||||||
|
|||||||
Reference in New Issue
Block a user