2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2020-07-27 16:42:02 -04:00
|
|
|
import Route from '@ember/routing/route';
|
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
|
|
|
|
|
export default class ScopesScopeGroupsRoute extends Route {
|
|
|
|
|
// =services
|
|
|
|
|
|
2020-08-18 16:49:45 -04:00
|
|
|
@service session;
|
2022-01-03 12:12:53 -05:00
|
|
|
@service router;
|
|
|
|
|
|
2020-07-27 16:42:02 -04:00
|
|
|
// =methods
|
|
|
|
|
|
2020-08-18 16:49:45 -04:00
|
|
|
/**
|
|
|
|
|
* If arriving here unauthenticated, redirect to index for further processing.
|
|
|
|
|
*/
|
|
|
|
|
beforeModel() {
|
2022-01-03 12:35:48 -05:00
|
|
|
if (!this.session.isAuthenticated) this.router.transitionTo('index');
|
2020-08-18 16:49:45 -04:00
|
|
|
}
|
2020-07-27 16:42:02 -04:00
|
|
|
}
|