Mixin that encapsulates some of the route restriction behavior.
If a roles array and a rejectedRoute property are specified, this mixin will ensure the user has adequate permissions before proceeding to the route.
Mixin designed to be used by a route. Routes that use this mixin MUST also use the PermissionsMixin
Usage: (in a routes file)
import Ember from 'ember';
import PermissionsMixin from '@bennerinformatics/ember-fw-gc/mixins/permissions';
import RestrictedRouteMixin from '@bennerinformatics/ember-fw-gc/mixins/restricted-route';
export default Ember.Route.extend(PermissionsMixin, RestrictedRouteMixin, {
// your code here
});
This mixin is used by the RestrictedRoute in your app, which means that any route which extends RestrictedRoute
in the
Informatics Apps automatically incorporates this mixin.