Helpers in Ember FW GC

If you don't remember what a helper is, a Helper is a way to call a Javascript function in Handlebars, and you can refresh your memory of the Ember Guides on Helpers. Ember FW GC defines three different helpers, which are all used to check whether a user has something, and it will return a boolean to allow you to change your template file on the basis of whether a user has a role, department, or app. This is what it defines:

  • has-role is by far the most common helper defined by Ember FW GC. It will return a boolean on the basis of whether a user has a specific role or not. It is very often used for displaying only certain information to those with the admin role.
  • has-app is similar to has-role, but instead of checking against role, it is checking against the apps a user has access to. This is not often used outside of Ember FW GC, but it is able to be used if you want it.
  • has-department is similar to the other two, except it checks the string against the departments the user is in. Again, not a lot of use case outside of Ember FW GC, but helpful to know about.