authorizer(req, res, next) {
        Logger.info('authorizing');
        let action = $CRUD[req.method] || null;
        this.authorize(req, action).then(data => {
            Logger.info('Authorized'); /** @todo Remove */
            next();
        }).catch(error => {
            Logger.warn('User is not authorized');
            next(error);
        });
    }
/**
     * Authorization middleware main function.
     * Calls next() is the user is authorized 
     * or next(error) to forward to error handler if the user is not authorized
     * @param {object} req - Express request object.
     * @param {object} res - Express response object.
     * @param {object} next - Express next function.
     */
Authorization middleware main function.
Calls next() is the user is authorized
or next(error) to forward to error handler if the user is not authorized
@param {object} req - Express request object.
@param {object} res - Express response object.
@param {object} next - Express next function.
Authorization middleware main function . Calls next () is the user is authorized or next ( error ) to forward to error handler if the user is not authorized @param { object } req - Express request object . @param { object } res - Express response object . @param { object } next - Express next function .
authorizer(req, res, next) {
        Logger.info('authorizing');
        let action = $CRUD[req.method] || null;
        this.authorize(req, action).then(data => {
            Logger.info('Authorized'); 
            next();
        }).catch(error => {
            Logger.warn('User is not authorized');
            next(error);
        });
    }
authorizer ( req , res , next ) { Logger . info ( 'authorizing' ) ; let action = $CRUD [ req . method ] || null ; this . authorize ( req , action ) . then ( data => { Logger . info ( 'Authorized' ) ; next ( ) ; } ) . catch ( error => { Logger . warn ( 'User is not authorized' ) ; next ( error ) ; } ) ; }
Authorization middleware main function.
Authorization middleware main function .
/** @todo Remove */