first init
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
import { Role } from '../types/index.js';
|
||||
export interface AuthenticatedRequest extends Request {
|
||||
boardAuth?: {
|
||||
boardId: string;
|
||||
role: Role;
|
||||
board: any;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Middleware to require board authorization.
|
||||
* Role parameter defaults to allowing both 'admin' and 'member'.
|
||||
* Pass 'admin' to restrict to superadmin only.
|
||||
*/
|
||||
export declare function requireBoardAuth(requiredRole?: Role): (req: AuthenticatedRequest, res: Response, next: NextFunction) => Promise<void>;
|
||||
Reference in New Issue
Block a user