UNPKG

@bennerinformatics/ember-fw-gc

Version:

A set of components, controllers, routes, and helpers used in all Group-Control managed FW App System applications

25 lines (23 loc) 985 B
import AuthRoute from '@bennerinformatics/ember-fw-gc/routes/auth'; import AuthRouteMixin from '@bennerinformatics/ember-fw-gc/mixins/auth-route'; /** * Convenience route that bundles some of the auth route mixins. It essentially handles redirects and everything to ensure that only users who are authenticated can * access the route. It also handles redirecting to index route if the user has no roles within the app. * * Usage: (in a routes file) * ```javascript * import AuthRoute from './auth'; * * export default AuthRoute.extend({ * // your code here... * }); * ``` * Basically all of the routes in your app should extend `AuthRoute` (or `RestrictedRoute` if only certain roles have access to that page) unless you want the route to be accessible * even if the user is not logged in. * * @class AuthRoute * @extends AuthRoute-Addon * @uses AuthRouteMixin * @module Miscellaneous */ export default AuthRoute.extend(AuthRouteMixin);