9 lines
238 B
TypeScript
9 lines
238 B
TypeScript
import { jsonError } from "../../common.js";
|
|
|
|
export async function onRequest(context: RequestContext) {
|
|
if (!(context.data.current_user.permissions & (1 << 5)))
|
|
return jsonError("Forbidden", 403);
|
|
|
|
return await context.next();
|
|
}
|