changes name from rolePermission to just permissions
adds functionality to check if the requesting user owns the resource
[x] write tests
amend old middleware tests to use new syntax
write new tests in permissions.test.js
Note: The middleware has not been properly added to routes yet, when it is, full integration tests for the middleware will be created from the old controller tests
the auth is completetly separate from the JWT stuff
WIP: currently failing tests because auth is req'd
relates #121
update:
related #134
rolePermission
to justpermissions
permissions.test.js
Note: The middleware has not been properly added to routes yet, when it is, full integration tests for the middleware will be created from the old controller tests
the auth is completetly separate from the JWT stuff WIP: currently failing tests because auth is req'd relates #121