mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 17:44:44 +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(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) => (
|
||||
|
|
|
@ -49,6 +49,7 @@ export default async function InvitePage(props: {
|
|||
)
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
error = formatAxiosError(e);
|
||||
});
|
||||
|
||||
if (res && res.status === 200) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue