[master]: Fix sandbox environement condition

This commit is contained in:
Konstantinos Triantafyllou 2024-01-18 10:13:06 +02:00
parent 2ec0e74a33
commit 1b870e7739
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ import {Session} from "../openaireLibrary/login/utils/helper.class";
export class SandboxGuard extends AdminDashboardGuard { export class SandboxGuard extends AdminDashboardGuard {
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree { canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
let sandbox = properties.environment !== 'beta' let sandbox = properties.environment === 'beta';;;;;
if(childRoute.data['researcher'] && childRoute.params.stakeholder && sandbox) { if(childRoute.data['researcher'] && childRoute.params.stakeholder && sandbox) {
let errorCode = LoginErrorCodes.NOT_LOGIN; let errorCode = LoginErrorCodes.NOT_LOGIN;
let alias = childRoute.params.stakeholder; let alias = childRoute.params.stakeholder;