'use strict';

const roleCtr = require('./../controllers/roles.js');
const authentication = require('./../middleware/authentication');
const authorisation  = require('./../middleware/authorisation');

const roleRouter = (router) => {
  router
    .route('/roles')
    .get(authentication, roleCtr.index)
    .post(authentication, roleCtr.create);

  router
    .route('/roles/:id')
    .get(authentication, roleCtr.show)
    .put(authentication, roleCtr.update)
    .delete(roleCtr.delete);
};

module.exports = roleRouter;

@@ -273,32 +273,47 @@
 (authentication,
+ authorisation,
  roleCtr.index)%0A
@@ -329,32 +329,47 @@
 (authentication,
+ authorisation,
  roleCtr.create)
@@ -421,32 +421,47 @@
 (authentication,
+ authorisation,
  roleCtr.show)%0A 
@@ -479,24 +479,39 @@
 hentication,
+ authorisation,
  roleCtr.upd

Add authorisation to roles route