Deprecated: Ember Component isVisible has been deprecated by Ember. Use has-role or has-department helper instead.
For Ember deprecation notice, click here. This component is used to show or hide a button based on a certain permission level or department. It is similar to the same function as has-role or has-department helpers, except more robust, and designed only for a button itself.
Basic Usage:
<AuthButton @perm="admin" @type="button" @class="btn btn-sm btn-default" @click={{action "click"}}>
Click me if you're an admin!
</AuthBlock>
See the docs for AuthComponentMixin for more details on how you can use this component.
Properties
defaultVisibility
Boolean public
This is the default visibility of the component which uses this mixin. This is used if neither
perm
nor department
are set.
Default: true
isVisible
Computed Boolean private
This sets the isVisible property, computed based on all the other properties passed in.
override
String public
If supplied, this will be checked against the user's roles using
the [match](MatchUtil.html) function. If it passes,
it will ignore the
department
property.