mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix tools when auth is disabled + log notifications to console
This commit is contained in:
@@ -121,9 +121,10 @@ export class ModuleHelper {
|
||||
invariant(c.context.app, "app is not available in mcp context");
|
||||
invariant(c.raw instanceof Request, "request is not available in mcp context");
|
||||
|
||||
const user = await c.context.app.module.auth.authenticator.resolveAuthFromRequest(
|
||||
c.raw as Request,
|
||||
);
|
||||
const auth = c.context.app.module.auth;
|
||||
if (!auth.enabled) return;
|
||||
|
||||
const user = await auth.authenticator?.resolveAuthFromRequest(c.raw as Request);
|
||||
|
||||
if (!this.ctx.guard.granted(permission, user)) {
|
||||
throw new Exception(
|
||||
|
||||
Reference in New Issue
Block a user