@wmfs/tymly-rbac-plugin

1.31.0 • Public • Published

tymly-rbac-plugin

Tymly Plugin npm (scoped) CircleCI codecov CodeFactor Dependabot badge Commitizen friendly JavaScript Style Guide license

This plugin handles role based authentication

...

Install

$ npm install tymly-rbac-plugin --save

Add to your list of Tymly plugin's using

await tymly.boot({
  blueprintPaths: [
    ...
  ],
  pluginPaths: [
    path.resolve('@wmfs/tymly-rbac-plugin'),
    ...
  ]
},
...

The RBAC service will initialise itself from state machine restrictions. Users can be added to groups using the ensureUserRole methods, or by populating the role and role-membership tables.

Tymly's Statebox service is RBAC aware and so, if this plugin is loaded, will using this service to control access to state machines.

Methods

listUserRoles(userId)

checkAuthorization(userId, ctx, resourceType, resourceName, action)

ensureUserRoles(userId, roleIds)

refreshRbacIndex()

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @wmfs/tymly-rbac-plugin

Weekly Downloads

173

Version

1.31.0

License

MIT

Unpacked Size

159 kB

Total Files

112

Last publish

Collaborators

  • wmfsbot