@kurbar/access-control
Version:
Role, Attribute and Condition based Access Control for Node.js
20 lines (19 loc) • 456 B
TypeScript
import { IRole } from "./IRole";
/**
* An interface that defines user context of the access control module.
* @interface
*/
interface IUser {
/**
* Indicates the id of a user.
* @type {String}
*/
id: string;
/**
* Indicates a single or multiple roles assigned to the current user.
* @type {Array<IRole>}
*/
roles: IRole[];
}
declare function isIUser(obj: any): obj is IUser;
export { IUser, isIUser };