small fixes to invite user workflow

This commit is contained in:
Milo Schwartz
2024-11-14 00:13:37 -05:00
parent ba3505a385
commit 8e64b5e0e9
4 changed files with 6 additions and 5 deletions

View File

@@ -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(
createHttpError(
HttpCode.BAD_REQUEST,

View File

@@ -69,7 +69,7 @@ export default async function SettingsLayout(props: SettingsLayoutProps) {
);
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");
}
} catch {

View File

@@ -308,13 +308,13 @@ export default function ReverseProxyTargets(props: {
cell: ({ row }) => (
<>
<div className="flex items-center justify-end space-x-2">
<Dot
{/* <Dot
className={
row.original.new || row.original.updated
? "opacity-100"
: "opacity-0"
}
/>
/> */}
<Button
variant="outline"
@@ -494,7 +494,7 @@ export default function ReverseProxyTargets(props: {
</Form>
</div>
<div className="rounded-md border mt-4">
<div className="rounded-md mt-4">
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (

View File

@@ -49,6 +49,7 @@ export default async function InvitePage(props: {
)
.catch((e) => {
console.error(e);
error = formatAxiosError(e);
});
if (res && res.status === 200) {