The template controller that can show or hide an Element based on the whether or not the user posses the required claims.
Example
<!-- Shows the button if the current user has 'manage:foo' claim. --> <button if-authorized.bind="{ type: 'manage', resource: 'foo' }" click.delegate="modify()">Save</button>
<!-- Shows the button-control if the current user has 'manage:bar' claim as well as the additional condition described by the `isDownloadLinkAvailable` is `true`. --> <button-control if-authorized="claim.bind: {type: 'manage', resource: 'bar'}; condition.bind: isDownloadLinkAvailable"> <normal-textvalue="Download"></normal-text> </button-control>
<!--Can be used with else-authorized--> <!-- Shows the close button if the current user does not have 'manage:foo' claim. --> <button if-authorized.bind="{ type: 'manage', resource: 'foo' }" click.delegate="modify()">Save</button> <buttonelse-authorizedclick.delegate="close()">Close</button>
The template controller that can show or hide an Element based on the whether or not the user posses the required claims.
Example