Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Handlebars  lets you build semantic templates effectively with no frustration. Handlebars helpers can be accessed from any context in a template. The ES permission model includes two Handlebars helpers that can be used to query permissions of a logged in user when rendering the UI element of a page.

  • hasAssetPermission

    Info

    For more information on the hasAssetPermission method, see hasAssetPermission.

    Example:

    Code Block
    {{#hasAssetPermission key=”ASSET_CREATE” type=gadget username=”admin” tenantId=”-1234” }}
    	<div>Secured</div>
    {{/hasAssetPermission}}
  • hasAppPermission

    Info

    For more information on the hasAssetPermission method, see hasAppPermission.

    Example:

    Code Block
    {{#hasAppPermission key=”ASSET_CREATE” username=”admin” tenantId=”-1234” }}
    	<div> Secured </div>
    {{/hasAppPermission}}