Skip to content
Permalink
Newer
Older
100644 10 lines (8 sloc) 272 Bytes
October 19, 2023 16:50
1
import { jsonError } from "../../../common.js";
2
October 19, 2023 16:50
3
export async function onRequest(context: RequestContext) {
4
if (
5
![1 << 4, 1 << 12].find((p) => context.data.current_user?.permissions & p)
6
)
October 19, 2023 16:50
7
return jsonError("Forbidden", 403);
October 19, 2023 16:50
8
9
return await context.next();
10
}