Added fix for missing enabled flag (#3235)
This commit is contained in:
parent
86248f7f11
commit
df072f5c15
1 changed files with 34 additions and 35 deletions
|
@ -120,8 +120,14 @@ export default function UserFederationSection() {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (userFederations) {
|
if (userFederations) {
|
||||||
cards = userFederations.sort(cardSorter).map((userFederation, index) => {
|
cards = userFederations.sort(cardSorter).map((userFederation, index) => (
|
||||||
const ufCardDropdownItems = [
|
<GalleryItem
|
||||||
|
key={index}
|
||||||
|
className="keycloak-admin--user-federation__gallery-item"
|
||||||
|
>
|
||||||
|
<KeycloakCard
|
||||||
|
id={userFederation.id!}
|
||||||
|
dropdownItems={[
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key={`${index}-cardDelete`}
|
key={`${index}-cardDelete`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -131,30 +137,23 @@ export default function UserFederationSection() {
|
||||||
>
|
>
|
||||||
{t("common:delete")}
|
{t("common:delete")}
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
];
|
]}
|
||||||
return (
|
|
||||||
<GalleryItem
|
|
||||||
key={index}
|
|
||||||
className="keycloak-admin--user-federation__gallery-item"
|
|
||||||
>
|
|
||||||
<KeycloakCard
|
|
||||||
id={userFederation.id!}
|
|
||||||
dropdownItems={ufCardDropdownItems}
|
|
||||||
providerId={userFederation.providerId!}
|
providerId={userFederation.providerId!}
|
||||||
title={userFederation.name!}
|
title={userFederation.name!}
|
||||||
footerText={toUpperCase(userFederation.providerId!)}
|
footerText={toUpperCase(userFederation.providerId!)}
|
||||||
labelText={
|
labelText={
|
||||||
userFederation.config!["enabled"][0] !== "false"
|
userFederation.config?.["enabled"]?.[0] !== "false"
|
||||||
? `${t("common:enabled")}`
|
? `${t("common:enabled")}`
|
||||||
: `${t("common:disabled")}`
|
: `${t("common:disabled")}`
|
||||||
}
|
}
|
||||||
labelColor={
|
labelColor={
|
||||||
userFederation.config!["enabled"][0] !== "false" ? "blue" : "gray"
|
userFederation.config?.["enabled"]?.[0] !== "false"
|
||||||
|
? "blue"
|
||||||
|
: "gray"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</GalleryItem>
|
</GalleryItem>
|
||||||
);
|
));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue