An open API service indexing awesome lists of open source software.

https://github.com/stalniy/casl-persisted-permissions-example

This example shows how to configure CASL with permissions that is stored in the database
https://github.com/stalniy/casl-persisted-permissions-example

acl casl example permissions roles

Last synced: about 1 month ago
JSON representation

This example shows how to configure CASL with permissions that is stored in the database

Awesome Lists containing this project

README

          

# CASL roles with persisted permissions

This example shows how to configure [CASL](https://github.com/stalniy/casl) with permissions that is stored in the database. See [Cookbook](https://stalniy.github.io/casl/en/cookbook/roles-with-persisted-permissions) for details.

## Installation

```sh
npm ci
npm run migrate # migrates sqlite database
npm run seed # adds default records to the database
```

## Run

To run application:

```sh
npm start
```

To update permissions of a member role:

```sh
npm run allowMembersToCreateAnyArticle
```