| Total Complexity | 2 |
| Complexity/F | 2 |
| Lines of Code | 15 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import { |
||
| 2 | config, |
||
|
|
|||
| 3 | User |
||
| 4 | } from '../../../' |
||
| 5 | |||
| 6 | /** |
||
| 7 | * Handlebars helper, to print className and escape it string |
||
| 8 | */ |
||
| 9 | export default function isAuthorized(route, role, ctx) { |
||
| 10 | if (User.utils.isUserAllowedOnRoute(role, route)) { |
||
| 11 | return ctx.fn(this) |
||
| 12 | }else { |
||
| 13 | return ctx.inverse(this) |
||
| 14 | } |
||
| 15 | } |
||
| 16 |