Production release November 2023 #20

Merged
argiro.kokogiannaki merged 75 commits from develop into master 2023-11-07 09:48:32 +01:00
9 changed files with 18 additions and 53 deletions
Showing only changes of commit 51e3980179 - Show all commits

View File

@ -1,20 +1,13 @@
import {filter, map, mergeMap, take} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable, of} from 'rxjs';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {UserManagementService} from "../../services/user-management.service";
@Injectable()
export class ConnectAdminLoginGuard implements CanActivate, CanActivateChild {
export class ConnectAdminLoginGuard {
constructor(private router: Router,
private userManagementService: UserManagementService) {

View File

@ -1,11 +1,5 @@
import { Injectable } from '@angular/core';
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
CanLoad, Route, UrlSegment, CanActivateChild, UrlTree
} from '@angular/router';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import {Observable} from 'rxjs';
import {ConnectHelper} from '../connectHelper';
@ -14,7 +8,7 @@ import {CommunityService} from "../community/community.service";
import {map} from "rxjs/operators";
@Injectable()
export class IsCommunity implements CanActivate, CanActivateChild {
export class IsCommunity {
constructor(private router: Router,
private communityService: CommunityService) {

View File

@ -1,13 +1,13 @@
import {Observable} from 'rxjs';
import {take, tap} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Data, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import { ActivatedRouteSnapshot, Data, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {ConfigurationService} from '../utils/configuration/configuration.service';
import {ConnectHelper} from '../connect/connectHelper';
import {properties} from "../../../environments/environment";
@Injectable()
export class IsRouteEnabled implements CanActivate {
export class IsRouteEnabled {
constructor(private router: Router,
private config: ConfigurationService) {

View File

@ -2,7 +2,7 @@ import {Injectable, Inject, PLATFORM_ID, Optional} from '@angular/core';
import {HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse, HttpHeaders} from '@angular/common/http';
import {Observable, of} from 'rxjs';
import {tap} from 'rxjs/operators';
import {TransferState, makeStateKey, StateKey} from '@angular/platform-browser';
import {TransferState, makeStateKey, StateKey} from '@angular/core';
import {isPlatformServer} from '@angular/common';
import {properties} from "../../environments/environment";
import {REQUEST} from "./utils/tokens";

View File

@ -1,12 +1,5 @@
import {Injectable} from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
CanActivateChild, Data,
Router,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { ActivatedRouteSnapshot, Data, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable} from 'rxjs';
import {Session} from './utils/helper.class';
import {LoginErrorCodes} from './utils/guardHelper.class';
@ -16,7 +9,7 @@ import {map, tap} from "rxjs/operators";
@Injectable({
providedIn: 'root'
})
export class AdminLoginGuard implements CanActivate, CanActivateChild {
export class AdminLoginGuard {
constructor(private router: Router,
private userManagementService: UserManagementService) {

View File

@ -1,16 +1,10 @@
import { Injectable } from '@angular/core';
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable} from 'rxjs';
import {LoginErrorCodes} from './utils/guardHelper.class';
@Injectable()
export class FreeGuard implements CanActivate {
export class FreeGuard {
constructor(private router: Router) {
}

View File

@ -1,14 +1,5 @@
import {Injectable} from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
CanActivateChild,
CanLoad,
Route,
Router,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { ActivatedRouteSnapshot, Route, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable} from 'rxjs';
import {LoginErrorCodes} from './utils/guardHelper.class';
import {map, tap} from "rxjs/operators";
@ -17,7 +8,7 @@ import {UserManagementService} from "../services/user-management.service";
@Injectable({
providedIn: 'root'
})
export class LoginGuard implements CanActivate, CanLoad, CanActivateChild {
export class LoginGuard {
constructor(private router: Router,
private userManagementService: UserManagementService) {

View File

@ -1,6 +1,6 @@
import {Observable} from 'rxjs';
import {Injectable} from '@angular/core';
import {CanDeactivate} from '@angular/router';
export interface IDeactivateComponent {
canExit: () => Observable<boolean> | Promise<boolean> | boolean;
@ -9,7 +9,7 @@ export interface IDeactivateComponent {
@Injectable({
providedIn: 'root'
})
export class CanExitGuard implements CanDeactivate<IDeactivateComponent> {
export class CanExitGuard {
constructor() {
}

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { CanDeactivate, Router} from '@angular/router';
import { Router } from '@angular/router';
import {Observable} from 'rxjs';
import {properties} from "../../../../environments/environment";
@Injectable({
providedIn: 'root'
}) // do not forget to register this class as a provider
export class PreviousRouteRecorder implements CanDeactivate<any> {
export class PreviousRouteRecorder {
constructor(private router: Router) {
}
canDeactivate(component: any): Observable<boolean> | boolean {