open-vault/ui/app/helpers/has-permission.js

11 lines
328 B
JavaScript
Raw Normal View History

import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
export default Helper.extend({
permissions: service(),
compute([route], { routeParams, capability }) {
let permissions = this.permissions;
return permissions.hasNavPermission(route, routeParams, capability);
},
});