@mamoorali295/rbac
Version:
Complete RBAC (Role-Based Access Control) system for Node.js with Express middleware, NestJS integration, GraphQL support, MongoDB & PostgreSQL support, modern admin dashboard, TypeScript support, and dynamic permission management
20 lines (19 loc) • 623 B
TypeScript
import { Document, Types } from "mongoose";
import { IFeature } from "./Feature";
import { IPermission } from "./Permission";
export interface IUserRole extends Document {
name: string;
description: string;
features?: IFeaturePermission[];
createdAt?: Date;
updatedAt?: Date;
}
export interface IFeaturePermission {
feature?: Types.ObjectId | IFeature;
permissions?: Types.ObjectId[] | IPermission[];
}
export declare const UserRole: import("mongoose").Model<IUserRole, {}, {}, {}, Document<unknown, {}, IUserRole, {}> & IUserRole & Required<{
_id: unknown;
}> & {
__v: number;
}, any>;