mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
Merge pull request #9381 from wenottingham/no-more-email
Make email not required for a user in the UI. Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -11,7 +11,7 @@ import FormField, {
|
|||||||
FormSubmitError,
|
FormSubmitError,
|
||||||
} from '../../../components/FormField';
|
} from '../../../components/FormField';
|
||||||
import OrganizationLookup from '../../../components/Lookup/OrganizationLookup';
|
import OrganizationLookup from '../../../components/Lookup/OrganizationLookup';
|
||||||
import { required, requiredEmail } from '../../../util/validators';
|
import { required } from '../../../util/validators';
|
||||||
import { FormColumnLayout } from '../../../components/FormLayout';
|
import { FormColumnLayout } from '../../../components/FormLayout';
|
||||||
|
|
||||||
function UserFormFields({ user, i18n }) {
|
function UserFormFields({ user, i18n }) {
|
||||||
@@ -76,8 +76,7 @@ function UserFormFields({ user, i18n }) {
|
|||||||
id="user-email"
|
id="user-email"
|
||||||
label={i18n._(t`Email`)}
|
label={i18n._(t`Email`)}
|
||||||
name="email"
|
name="email"
|
||||||
validate={requiredEmail(i18n)}
|
type="text"
|
||||||
isRequired
|
|
||||||
/>
|
/>
|
||||||
{!ldapUser && !(socialAuthUser && externalAccount) && (
|
{!ldapUser && !(socialAuthUser && externalAccount) && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export const User = shape({
|
|||||||
username: string,
|
username: string,
|
||||||
first_name: string,
|
first_name: string,
|
||||||
last_name: string,
|
last_name: string,
|
||||||
email: string.isRequired,
|
email: string,
|
||||||
is_superuser: bool,
|
is_superuser: bool,
|
||||||
is_system_auditor: bool,
|
is_system_auditor: bool,
|
||||||
ldap_dn: string,
|
ldap_dn: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user