UNPKG

gypsum

Version:

Simple and easy lightweight typescript server side framework on Node.js.

15 lines (14 loc) 515 B
import * as MongoDB from 'mongodb'; import { Model } from "../models"; import { Context } from '../context'; export declare class Authorization extends Model { roles: MongoDB.Collection; groups: MongoDB.Collection; private _mGetUserRolesFromGroups(id); private _mGetUserPermissionsFromRules(id, extraRules?); private _mFetchData(appName, modelName, options, ctx); authorize(options: { match: string; fetch: any; } | boolean, ctx: Context): Promise<void>; }