Hi,
With handlebars i have this helper:
Ember.Handlebars.registerHelper('isGranted', function(action,options) {
return Ember.Handlebars.bind.call(options.contexts[0], "user.actions", options, true, function(result) {
return App.userManager.get("current").isGranted(action);
});
});
I know it doesn’t deserve a beauty price, but it worked.
With htmlbars, the bind.call method doesn’t work anymore. How can i make this work with htmlbars? What i want: – template —
<h1>Nice template </h1>
{{#isGranted 'specialRole'}}
You have access
{{else}}
nop
{{/isGranted}}
this should ask user.isGranted(); to check the access, but i want to bind it to user.actions, because if the actions change, it should check again.
Any idea’s how to fix this helper in ember 1.11.1 ?