Don't allow non-management to access et member management
This commit is contained in:
parent
730e55ebac
commit
2cd5c7a5b7
@ -37,11 +37,7 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
status: 401,
|
status: 401,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (
|
if (![1 << 4, 1 << 12].find((p) => context.data.current_user.permissions & p))
|
||||||
![1 << 3, 1 << 4, 1 << 12].find(
|
|
||||||
(p) => context.data.current_user.permissions & p,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
throw new Response(null, {
|
throw new Response(null, {
|
||||||
status: 403,
|
status: 403,
|
||||||
});
|
});
|
||||||
|
@ -454,9 +454,11 @@ export default function () {
|
|||||||
<Link color="#646cff" href="/book-event" mt="16px">
|
<Link color="#646cff" href="/book-event" mt="16px">
|
||||||
Book an Event
|
Book an Event
|
||||||
</Link>
|
</Link>
|
||||||
<Link color="#646cff" href="/et-members" mb="32px" mt="8px">
|
{can_approve ? (
|
||||||
Events Team Member Management
|
<Link color="#646cff" href="/et-members" mb="32px" mt="8px">
|
||||||
</Link>
|
Events Team Member Management
|
||||||
|
</Link>
|
||||||
|
) : null}
|
||||||
</VStack>
|
</VStack>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user