mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 10:16:41 +00:00
fix cant create oidc user closes #1472
This commit is contained in:
@@ -106,8 +106,7 @@ export default function Page() {
|
|||||||
.optional()
|
.optional()
|
||||||
.or(z.literal("")),
|
.or(z.literal("")),
|
||||||
name: z.string().optional(),
|
name: z.string().optional(),
|
||||||
roleId: z.string().min(1, { message: t("accessRoleSelectPlease") }),
|
roleId: z.string().min(1, { message: t("accessRoleSelectPlease") })
|
||||||
idpId: z.string().min(1, { message: t("idpSelectPlease") })
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const formatIdpType = (type: string) => {
|
const formatIdpType = (type: string) => {
|
||||||
@@ -125,7 +124,7 @@ export default function Page() {
|
|||||||
|
|
||||||
const getIdpIcon = (variant: string | null) => {
|
const getIdpIcon = (variant: string | null) => {
|
||||||
if (!variant) return null;
|
if (!variant) return null;
|
||||||
|
|
||||||
switch (variant.toLowerCase()) {
|
switch (variant.toLowerCase()) {
|
||||||
case "google":
|
case "google":
|
||||||
return (
|
return (
|
||||||
@@ -186,8 +185,7 @@ export default function Page() {
|
|||||||
username: "",
|
username: "",
|
||||||
email: "",
|
email: "",
|
||||||
name: "",
|
name: "",
|
||||||
roleId: "",
|
roleId: ""
|
||||||
idpId: ""
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -338,7 +336,7 @@ export default function Page() {
|
|||||||
) {
|
) {
|
||||||
const selectedUserOption = userOptions.find(opt => opt.id === selectedOption);
|
const selectedUserOption = userOptions.find(opt => opt.id === selectedOption);
|
||||||
if (!selectedUserOption?.idpId) return;
|
if (!selectedUserOption?.idpId) return;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
const res = await api
|
const res = await api
|
||||||
@@ -378,7 +376,7 @@ export default function Page() {
|
|||||||
) {
|
) {
|
||||||
const selectedUserOption = userOptions.find(opt => opt.id === selectedOption);
|
const selectedUserOption = userOptions.find(opt => opt.id === selectedOption);
|
||||||
if (!selectedUserOption?.idpId) return;
|
if (!selectedUserOption?.idpId) return;
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
const res = await api
|
const res = await api
|
||||||
|
|||||||
Reference in New Issue
Block a user