casbin
Version:
An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS
10 lines (9 loc) • 401 B
TypeScript
import { Enforcer } from './enforcer';
/**
* Experiment!
* getPermissionForCasbinJs returns a string include the whole model.
* You can pass the returned string to the frontend and manage your webpage widgets and APIs with Casbin.js.
* @param e the initialized enforcer
* @param user the user
*/
export declare function casbinJsGetPermissionForUser(e: Enforcer, user?: string): Promise<string>;