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:
softwarefactory-project-zuul[bot]
2021-02-23 16:27:56 +00:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -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) && (
<> <>

View File

@@ -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,