Flexible and powerful permissions module for Feathers
This module is not published yet. It's awaiting one more breaking change and then will go out by Nov. 21st. If you are feeling adventurous you can use by referencing
feathersjs/feathers-permission in your
npm install feathers-permissions --save
Feathers permissions allows you to grant and manage permissions in a flexible nature. Each object that requires permissions must have an array or a comma separated string of permissions stored on it (typically in your database). It typically goes hand in hand with feathers-authentication.
Here's an example of a Feathers server that uses
// appconst feathers = ;const rest = ;const hooks = ;const bodyParser = ;const errorHandler = ;const hooks = hooks;const middleware = middleware;const memory = ;// Initialize the applicationconst app =// Needed for parsing bodies (login)// Initialize your feathers plugin;app;app;console;
This is assuming you are not using sockets.
// appconst express = ;const bodyParser = ;const errorHandler = ;const notFound = ;const middleware = middleware;const passport = ;const local = ;// Initialize the applicationconst app =// Needed for parsing bodies (login);app;app;const options =permissions: 'admin' 'superadmin'on: 'user'field: 'role';app;app;app;app;console;
Copyright (c) 2016
Licensed under the MIT license.