Files
threshold-ui/ui/admin/app/routes/scopes/scope/auth-methods.js
T
2025-03-12 08:29:54 -07:00

24 lines
491 B
JavaScript

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