set alias to read only in IdPs (#1144)
This commit is contained in:
parent
779056bef2
commit
7414e174b6
3 changed files with 10 additions and 1 deletions
|
@ -77,6 +77,7 @@ export const IdentityProvidersSection = () => {
|
|||
realm,
|
||||
providerId: identityProvider.providerId,
|
||||
alias: identityProvider.alias!,
|
||||
tab: "settings",
|
||||
})}
|
||||
>
|
||||
{identityProvider.displayName
|
||||
|
@ -140,7 +141,7 @@ export const IdentityProvidersSection = () => {
|
|||
{manageDisplayDialog && (
|
||||
<ManageOderDialog
|
||||
onClose={() => setManageDisplayDialog(false)}
|
||||
providers={providers?.filter((p) => p.enabled)}
|
||||
providers={providers.filter((p) => p.enabled)}
|
||||
/>
|
||||
)}
|
||||
<ViewHeader
|
||||
|
|
|
@ -7,10 +7,13 @@ import { HelpItem } from "../../components/help-enabler/HelpItem";
|
|||
import { RedirectUrl } from "../component/RedirectUrl";
|
||||
import { TextField } from "../component/TextField";
|
||||
import { DisplayOrder } from "../component/DisplayOrder";
|
||||
import type { IdentityProviderTabParams } from "../routes/IdentityProviderTab";
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
export const OIDCGeneralSettings = ({ id }: { id: string }) => {
|
||||
const { t } = useTranslation("identity-providers");
|
||||
const { t: th } = useTranslation("identity-providers-help");
|
||||
const { tab } = useParams<IdentityProviderTabParams>();
|
||||
|
||||
const { register, errors } = useFormContext();
|
||||
|
||||
|
@ -35,6 +38,7 @@ export const OIDCGeneralSettings = ({ id }: { id: string }) => {
|
|||
helperTextInvalid={t("common:required")}
|
||||
>
|
||||
<TextInput
|
||||
isReadOnly={tab === "settings"}
|
||||
isRequired
|
||||
type="text"
|
||||
id="alias"
|
||||
|
|
|
@ -7,10 +7,13 @@ import { HelpItem } from "../../components/help-enabler/HelpItem";
|
|||
import { RedirectUrl } from "../component/RedirectUrl";
|
||||
import { TextField } from "../component/TextField";
|
||||
import { DisplayOrder } from "../component/DisplayOrder";
|
||||
import { useParams } from "react-router";
|
||||
import type { IdentityProviderTabParams } from "../routes/IdentityProviderTab";
|
||||
|
||||
export const SamlGeneralSettings = ({ id }: { id: string }) => {
|
||||
const { t } = useTranslation("identity-providers");
|
||||
const { t: th } = useTranslation("identity-providers-help");
|
||||
const { tab } = useParams<IdentityProviderTabParams>();
|
||||
|
||||
const { register, errors } = useFormContext();
|
||||
|
||||
|
@ -40,6 +43,7 @@ export const SamlGeneralSettings = ({ id }: { id: string }) => {
|
|||
id="alias"
|
||||
data-testid="alias"
|
||||
name="alias"
|
||||
isReadOnly={tab === "settings"}
|
||||
validated={
|
||||
errors.alias ? ValidatedOptions.error : ValidatedOptions.default
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue