mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-21 16:25:19 +00:00
♻️ refactor
This commit is contained in:
@@ -175,26 +175,6 @@ export default function GeneralPage() {
|
|||||||
}, [variant]);
|
}, [variant]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchRoles() {
|
|
||||||
const res = await api
|
|
||||||
.get<AxiosResponse<ListRolesResponse>>(`/org/${orgId}/roles`)
|
|
||||||
.catch((e) => {
|
|
||||||
console.error(e);
|
|
||||||
toast({
|
|
||||||
variant: "destructive",
|
|
||||||
title: t("accessRoleErrorFetch"),
|
|
||||||
description: formatAxiosError(
|
|
||||||
e,
|
|
||||||
t("accessRoleErrorFetchDescription")
|
|
||||||
)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
if (res?.status === 200) {
|
|
||||||
setRoles(res.data.data.roles);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const loadIdp = async (
|
const loadIdp = async (
|
||||||
availableRoles: { roleId: number; name: string }[]
|
availableRoles: { roleId: number; name: string }[]
|
||||||
) => {
|
) => {
|
||||||
@@ -212,11 +192,6 @@ export default function GeneralPage() {
|
|||||||
const detectedRoleMappingConfig =
|
const detectedRoleMappingConfig =
|
||||||
detectRoleMappingConfig(roleMapping);
|
detectRoleMappingConfig(roleMapping);
|
||||||
|
|
||||||
console.log({
|
|
||||||
detectedRoleMappingConfig,
|
|
||||||
roleMapping
|
|
||||||
});
|
|
||||||
|
|
||||||
// Extract tenant ID from Azure URLs if present
|
// Extract tenant ID from Azure URLs if present
|
||||||
let tenantId = "";
|
let tenantId = "";
|
||||||
if (idpVariant === "azure" && data.idpOidcConfig?.authUrl) {
|
if (idpVariant === "azure" && data.idpOidcConfig?.authUrl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user