mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-09 15:56:33 +00:00
Fix UI :- fix the Password field showing in SSO login (#7811)
* Fix the Password field showing in SSO login * changes as per comments
This commit is contained in:
parent
986ce4a8b8
commit
c4d67f489e
@ -26,7 +26,7 @@ import { AxiosError } from 'axios';
|
||||
import classNames from 'classnames';
|
||||
import { isUndefined } from 'lodash';
|
||||
import { EditorContentRef } from 'Models';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import { useAuthContext } from '../../authentication/auth-provider/AuthProvider';
|
||||
import { generateRandomPwd } from '../../axiosAPIs/auth-API';
|
||||
import { getBotsPagePath, getUsersPagePath } from '../../constants/constants';
|
||||
@ -36,6 +36,7 @@ import {
|
||||
validEmailRegEx,
|
||||
} from '../../constants/regex.constants';
|
||||
import { PageLayoutType } from '../../enums/layout.enum';
|
||||
import { AuthTypes } from '../../enums/signin.enum';
|
||||
import { CreatePasswordGenerator } from '../../enums/user.enum';
|
||||
import {
|
||||
CreatePasswordType,
|
||||
@ -109,6 +110,11 @@ const CreateUser = ({
|
||||
{} as SSOClientConfig
|
||||
);
|
||||
|
||||
const isAuthProviderBasic = useMemo(
|
||||
() => authConfig?.provider === AuthTypes.BASIC,
|
||||
[authConfig]
|
||||
);
|
||||
|
||||
const slashedBreadcrumbList = [
|
||||
{
|
||||
name: forceBot ? 'Bots' : 'Users',
|
||||
@ -775,6 +781,8 @@ const CreateUser = ({
|
||||
<RichTextEditor initialValue={description} ref={markdownRef} />
|
||||
</Form.Item>
|
||||
|
||||
{isAuthProviderBasic && (
|
||||
<>
|
||||
<Radio.Group
|
||||
name="passwordGenerator"
|
||||
value={passwordGenerator}
|
||||
@ -861,7 +869,9 @@ const CreateUser = ({
|
||||
</div>
|
||||
|
||||
<div className="w-8 h-7 flex-center">
|
||||
<CopyToClipboardButton copyText={generatedPassword} />
|
||||
<CopyToClipboardButton
|
||||
copyText={generatedPassword}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@ -871,6 +881,8 @@ const CreateUser = ({
|
||||
</Form.Item>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
{!forceBot && (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user