Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Unauthorized } = require('feathers-errors');
- return function() {
- return function(context) {
- if(context.params.user.roles.indexOf('admin') === -1) {
- throw new Unauthorized('You are not allowed to access this');
- }
- }
- }
Add Comment
Please, Sign In to add comment