mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-19 00:40:40 +02:00
add idp to profile dropdown
This commit is contained in:
parent
8fa719181a
commit
e2f056e6ca
4 changed files with 18 additions and 10 deletions
|
@ -380,9 +380,10 @@ export default function PoliciesPage() {
|
||||||
JMESPath to extract
|
JMESPath to extract
|
||||||
organization information
|
organization information
|
||||||
from the ID token. This
|
from the ID token. This
|
||||||
expression must return true
|
expression must return thr
|
||||||
for the user to be allowed
|
org ID or true for the user
|
||||||
to access the organization.
|
to be allowed to access the
|
||||||
|
organization.
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -576,9 +577,10 @@ export default function PoliciesPage() {
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
JMESPath to extract organization
|
JMESPath to extract organization
|
||||||
information from the ID token.
|
information from the ID token.
|
||||||
This expression must return true
|
This expression must return the
|
||||||
for the user to be allowed to
|
org ID or true for the user to
|
||||||
access the organization.
|
be allowed to access the
|
||||||
|
organization.
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default async function Page(props: {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isInvite && (
|
{isInvite && (
|
||||||
<div className="border rounded-md p-3 mb-4">
|
<div className="border rounded-md p-3 mb-4 bg-card">
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<Mail className="w-12 h-12 mb-4 text-primary" />
|
<Mail className="w-12 h-12 mb-4 text-primary" />
|
||||||
<h2 className="text-2xl font-bold mb-2 text-center">
|
<h2 className="text-2xl font-bold mb-2 text-center">
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default async function Page(props: {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isInvite && (
|
{isInvite && (
|
||||||
<div className="border rounded-md p-3 mb-4">
|
<div className="border rounded-md p-3 mb-4 bg-card">
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<Mail className="w-12 h-12 mb-4 text-primary" />
|
<Mail className="w-12 h-12 mb-4 text-primary" />
|
||||||
<h2 className="text-2xl font-bold mb-2 text-center">
|
<h2 className="text-2xl font-bold mb-2 text-center">
|
||||||
|
|
|
@ -38,7 +38,9 @@ export default function ProfileIcon() {
|
||||||
const [openDisable2fa, setOpenDisable2fa] = useState(false);
|
const [openDisable2fa, setOpenDisable2fa] = useState(false);
|
||||||
|
|
||||||
function getInitials() {
|
function getInitials() {
|
||||||
return (user.email || user.name || user.username).substring(0, 1).toUpperCase();
|
return (user.email || user.name || user.username)
|
||||||
|
.substring(0, 1)
|
||||||
|
.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleThemeChange(theme: "light" | "dark" | "system") {
|
function handleThemeChange(theme: "light" | "dark" | "system") {
|
||||||
|
@ -95,10 +97,14 @@ export default function ProfileIcon() {
|
||||||
{user.email || user.name || user.username}
|
{user.email || user.name || user.username}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{user.serverAdmin && (
|
{user.serverAdmin ? (
|
||||||
<p className="text-xs leading-none text-muted-foreground mt-2">
|
<p className="text-xs leading-none text-muted-foreground mt-2">
|
||||||
Server Admin
|
Server Admin
|
||||||
</p>
|
</p>
|
||||||
|
) : (
|
||||||
|
<p className="text-xs leading-none text-muted-foreground mt-2">
|
||||||
|
{user.idpName || "Internal"}
|
||||||
|
</p>
|
||||||
)}
|
)}
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue