debug
This commit is contained in:
parent
3581ee12ab
commit
3032a8b83d
@ -16,6 +16,7 @@ import MongoStore from "connect-mongo";
|
||||
import { MiddlewareFunction, Request, Response } from "../../../@types/Server.js";
|
||||
import { NextFunction } from "express";
|
||||
import { User } from "../structures/index.js";
|
||||
import { inspect } from "node:util";
|
||||
|
||||
const OAuthLinks: { [key: string]: string } = {};
|
||||
|
||||
@ -246,6 +247,8 @@ class Authenticator {
|
||||
// Has permission
|
||||
if (user.hasPermission(permission, level))
|
||||
return next();
|
||||
|
||||
this.#logger.debug(`Invalid perms ${permission}, ${level}\n${inspect(req.user.permissions)}`);
|
||||
return res.status(403).send('Insufficient permissions');
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user