Function: createRbacPlugin()
ts
function createRbacPlugin(options?): RbacPlugin;Defined in: packages/vue/src/plugin.ts:28
Creates the Vue plugin. The returned object is also the RBAC instance, so it can be used outside components (router guards, stores):
ts
export const rbac = createRbacPlugin({ snapshot: window.__RBAC__, wildcard: true })
app.use(rbac)
// later, after login:
rbac.setSnapshot(await api.get('/me/permissions'))Parameters
| Parameter | Type |
|---|---|
options? | RbacPluginOptions |
