Handlebars lets you build semantic templates effectively with no frustration. Handlebars helpers can be accessed from any context in a template.
The permission model includes two Handlebars helpers that can be used to query permissions of a logged in user when rendering UI element of a page.
hasAssetPermission
For more information on the hasAssetPermission method, see hasAssetPermission.
Example:{{#hasAssetPermission key=”ASSET_CREATE” type=gadget username=”admin” tenantId=”-1234” }} <div>Secured</div> {{/hasAssetPermission}}
hasAppPermission
For more information on the hasAssetPermission method, see hasAppPermission.
Example:{{#hasAppPermission key=”ASSET_CREATE” username=”admin” tenantId=”-1234” }} <div> Secured </div> {{/hasAppPermission}}