Files
threshold-ui/ui/admin/app/routes/scopes/scope/auth-methods.js
T

23 lines
492 B
JavaScript
Raw Normal View History

/**
2026-01-28 17:09:06 -08:00
* Copyright IBM Corp. 2021, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
2020-08-12 15:43:34 -04:00
import Route from '@ember/routing/route';
import { service } from '@ember/service';
2020-08-12 15:43:34 -04:00
export default class ScopesScopeAuthMethodsRoute extends Route {
2020-08-12 17:16:41 -04:00
// =services
@service session;
@service router;
2020-08-12 15:43:34 -04:00
// =methods
/**
* If arriving here unauthenticated, redirect to index for further processing.
*/
beforeModel() {
if (!this.session.isAuthenticated) this.router.transitionTo('index');
}
2020-08-12 15:43:34 -04:00
}