Skip to content
Permalink
84e7df6c30
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
1 contributor

Users who have contributed to this file

10 lines (8 sloc) 272 Bytes
import { jsonError } from "../../../common.js";
export async function onRequest(context: RequestContext) {
if (
![1 << 4, 1 << 12].find((p) => context.data.current_user?.permissions & p)
)
return jsonError("Forbidden", 403);
return await context.next();
}