'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isAuthorized;

var _ = require('../../../');

/**
 * Handlebars helper, to print className and escape it string
 */
function isAuthorized(route, role, ctx) {
  if (_.User.utils.isUserAllowedOnRoute(role, route)) {
    return ctx.fn(this);
  } else {
    return ctx.inverse(this);
  }
}