npm.io
0.0.1 • Published 3d ago

multivendor-rbac

Licence
MIT
Version
0.0.1
Deps
0
Size
1.1 MB
Vulns
0
Weekly
0

multivendor-rbac

Pluggable RBAC engine. One core, seller/admin providers.

Init

import { RBACModule, rbac } from 'multivendor-rbac';

RBACModule.init({ connection, providers: ['seller'] });
RBACModule.init({ connection, providers: ['admin'] });
RBACModule.init({ connection, providers: ['seller', 'admin'] });

await rbac.provider('seller').assignRole(customerId, roleId);