Creates a basic permit
function that will check
a user's roles against a list of provided roles using the
match function. Designed to be used by a route.
Usage: (in a route file)
import Ember from 'ember';
import PermissionsMixin from '@bennerinformatics/ember-fw-gc/mixin/permissions';
export default Ember.Route.extend(PermissionsMixin, {
// your code here
});
This mixin is used by the addon AuthRoute, which is extended by both AuthRoute and RestrictedRoute, so then, this mixin
is incorporated behind the scenes into all the routes used in the Informatics Apps (whether AuthRoute
or RestrictedRoute
).