codersforcauses / p2s-backend

p2s rugbyworks backend
MIT License
7 stars 0 forks source link

[FEATURE] Add permission binding to who can do what in the backend #39

Closed fezproof closed 5 years ago

fezproof commented 5 years ago

Use the permissions hook to apply ho can do what in the backend This will decide if admins, managers or coaches can control endpoints

const permission = require('../../hooks/permission');

// =======

create: [
  permission({
    roles: ['admin', 'coach'],
  }),
]