mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
107873: Add redirect on 4xx
This commit is contained in:
@@ -14,6 +14,9 @@ import { map, switchMap } from 'rxjs/operators';
|
|||||||
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
||||||
import { PaginationService } from 'src/app/core/pagination/pagination.service';
|
import { PaginationService } from 'src/app/core/pagination/pagination.service';
|
||||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||||
|
import { redirectOn4xx } from '../../../core/shared/authorized.operators';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { AuthService } from '../../../core/auth/auth.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-process-overview-table',
|
selector: 'ds-process-overview-table',
|
||||||
@@ -61,7 +64,10 @@ export class ProcessOverviewTableComponent implements OnInit {
|
|||||||
protected processBulkDeleteService: ProcessBulkDeleteService,
|
protected processBulkDeleteService: ProcessBulkDeleteService,
|
||||||
protected ePersonDataService: EPersonDataService,
|
protected ePersonDataService: EPersonDataService,
|
||||||
protected dsoNameService: DSONameService,
|
protected dsoNameService: DSONameService,
|
||||||
protected paginationService: PaginationService) {
|
protected paginationService: PaginationService,
|
||||||
|
protected router: Router,
|
||||||
|
protected auth: AuthService,
|
||||||
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -77,13 +83,12 @@ export class ProcessOverviewTableComponent implements OnInit {
|
|||||||
.pipe(
|
.pipe(
|
||||||
map((paginationOptions: PaginationComponentOptions) =>
|
map((paginationOptions: PaginationComponentOptions) =>
|
||||||
this.processOverviewService.getFindListOptions(paginationOptions)),
|
this.processOverviewService.getFindListOptions(paginationOptions)),
|
||||||
switchMap(
|
switchMap((findListOptions: FindListOptions) =>
|
||||||
(findListOptions: FindListOptions) => {
|
this.processOverviewService.getProcessesByProcessStatus(
|
||||||
return this.processOverviewService.getProcessesByProcessStatus(
|
this.processStatus, findListOptions, this.useAutoRefreshingSearchBy ? this.autoRefreshInterval : null)
|
||||||
this.processStatus, findListOptions, this.useAutoRefreshingSearchBy ? this.autoRefreshInterval : null);
|
),
|
||||||
}
|
redirectOn4xx(this.router, this.auth),
|
||||||
));
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user