Deprecated: Ember Component isVisible has been deprecated by Ember. Use has-role or has-department helper instead.
For Ember deprecation notice, click here. Basic mixin to be implemented in various components that enables showing or hiding it based on auth permissions
To use in a component:
// app/components/some-component.js
import Ember from 'ember';
import AuthComponentMixin from '@bennerinformatics/ember-fw-gc/mixins/auth-component';
export default Ember.Component.extend(AuthComponentMixin, {
// your code here....
});
This is used in the AuthBlock and AuthButton components. You are able to use this in your own components too, but it is likely that you will never call this component directly.
Properties
defaultVisibility
Boolean publicThis 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 privateThis sets the isVisible property, computed based on all the other properties passed in.