Files
threshold-ui/ui/admin/app/routes/scopes/scope/sessions.js
T
2024-05-31 11:29:24 -07:00

22 lines
483 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ScopesScopeSessionsRoute extends Route {
// =services
@service session;
@service router;
/**
* If arriving here unauthenticated, redirect to index for further processing.
*/
beforeModel() {
if (!this.session.isAuthenticated) this.router.transitionTo('index');
}
}