mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 09:46:40 +00:00
💡remove comment
This commit is contained in:
@@ -232,74 +232,6 @@ export default function ResourceAuthenticationPage() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!pageLoading || hasInitializedRef.current) return;
|
if (!pageLoading || hasInitializedRef.current) return;
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
|
|
||||||
setAllUsers(
|
|
||||||
usersResponse.data.data.users.map((user) => ({
|
|
||||||
id: user.id.toString(),
|
|
||||||
text: `${user.email || user.username}${user.type !== UserType.Internal ? ` (${user.idpName})` : ""}`
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
whitelistForm.setValue(
|
|
||||||
"emails",
|
|
||||||
whitelist.data.data.whitelist.map((w) => ({
|
|
||||||
id: w.email,
|
|
||||||
text: w.email
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
|
|
||||||
if (build === "saas") {
|
|
||||||
if (subscription?.subscribed) {
|
|
||||||
setAllIdps(
|
|
||||||
idpsResponse.data.data.idps.map((idp) => ({
|
|
||||||
id: idp.idpId,
|
|
||||||
text: idp.name
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setAllIdps(
|
|
||||||
idpsResponse.data.data.idps.map((idp) => ({
|
|
||||||
id: idp.idpId,
|
|
||||||
text: idp.name
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
autoLoginEnabled &&
|
|
||||||
!selectedIdpId &&
|
|
||||||
idpsResponse.data.data.idps.length > 0
|
|
||||||
) {
|
|
||||||
setSelectedIdpId(idpsResponse.data.data.idps[0].idpId);
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
usersRolesForm.setValue(
|
|
||||||
"roles",
|
|
||||||
resourceRolesResponse.data.data.roles
|
|
||||||
.map((i) => ({
|
|
||||||
id: i.roleId.toString(),
|
|
||||||
text: i.name
|
|
||||||
}))
|
|
||||||
.filter((role) => role.text !== "Admin")
|
|
||||||
);
|
|
||||||
|
|
||||||
usersRolesForm.setValue(
|
|
||||||
"users",
|
|
||||||
resourceUsersResponse.data.data.users.map((i) => ({
|
|
||||||
id: i.userId.toString(),
|
|
||||||
text: `${i.email || i.username}${i.type !== UserType.Internal ? ` (${i.idpName})` : ""}`
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
|
|
||||||
usersRolesForm.setValue(
|
usersRolesForm.setValue(
|
||||||
"roles",
|
"roles",
|
||||||
resourceRoles
|
resourceRoles
|
||||||
|
|||||||
Reference in New Issue
Block a user