mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-28 13:48:13 +02:00
small fixes to invite user workflow
This commit is contained in:
parent
ba3505a385
commit
8e64b5e0e9
4 changed files with 6 additions and 5 deletions
|
@ -89,7 +89,7 @@ export async function acceptInvite(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existingUser[0].email !== existingInvite[0].email) {
|
if (req.user && req.user.email !== existingInvite[0].email) {
|
||||||
return next(
|
return next(
|
||||||
createHttpError(
|
createHttpError(
|
||||||
HttpCode.BAD_REQUEST,
|
HttpCode.BAD_REQUEST,
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
|
||||||
);
|
);
|
||||||
const orgUser = await getOrgUser();
|
const orgUser = await getOrgUser();
|
||||||
|
|
||||||
if (!orgUser.data.data.isAdmin || !orgUser.data.data.isOwner) {
|
if (!orgUser.data.data.isAdmin && !orgUser.data.data.isOwner) {
|
||||||
throw new Error("User is not an admin or owner");
|
throw new Error("User is not an admin or owner");
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
@ -308,13 +308,13 @@ export default function ReverseProxyTargets(props: {
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<>
|
<>
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Dot
|
{/* <Dot
|
||||||
className={
|
className={
|
||||||
row.original.new || row.original.updated
|
row.original.new || row.original.updated
|
||||||
? "opacity-100"
|
? "opacity-100"
|
||||||
: "opacity-0"
|
: "opacity-0"
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
@ -494,7 +494,7 @@ export default function ReverseProxyTargets(props: {
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="rounded-md border mt-4">
|
<div className="rounded-md mt-4">
|
||||||
<Table>
|
<Table>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
{table.getHeaderGroups().map((headerGroup) => (
|
{table.getHeaderGroups().map((headerGroup) => (
|
||||||
|
|
|
@ -49,6 +49,7 @@ export default async function InvitePage(props: {
|
||||||
)
|
)
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
error = formatAxiosError(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res && res.status === 200) {
|
if (res && res.status === 200) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue