maestro-server/server-app

View on GitHub
app/identity/services/validator/validAccessService.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
'use strict';

const PermissionError = require('core/errors/factoryError')('PermissionError');
const _ = require('lodash');


module.exports = function (e) {
      if (_.isEmpty(e))
          throw new PermissionError('You not authorize to do this!');
      return e;
};