diff --git a/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.spec.ts b/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.spec.ts index ff81343366e..ef500598a01 100644 --- a/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.spec.ts +++ b/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.spec.ts @@ -18,7 +18,6 @@ describe('dsoPageSomeFeatureGuard and its functions', () => { let authorizationService: AuthorizationDataService; let router: Router; let authService: AuthService; - // let resolver: Resolve>; let resolver: ResolveFn>>; let object: DSpaceObject; let route; @@ -74,14 +73,14 @@ describe('dsoPageSomeFeatureGuard and its functions', () => { done(); }); }); - }) + }); describe('getRouteWithDSOId', () => { it('should return the route that has the UUID of the DSO', () => { const foundRoute = getRouteWithDSOId(route); expect(foundRoute).toBe(parentRoute); }); - }) + }); describe('dsoPageSomeFeatureGuard', () => { diff --git a/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.ts b/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.ts index 165edd7f5bb..e920687ecf6 100644 --- a/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.ts +++ b/src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.ts @@ -19,7 +19,7 @@ export declare type DSOGetObjectURlFn = (resolve: Resolv * Method to resolve resolve (parent) route that contains the UUID of the DSO * @param route The current route */ -const getRouteWithDSOId = (route: ActivatedRouteSnapshot): ActivatedRouteSnapshot => { +export const getRouteWithDSOId = (route: ActivatedRouteSnapshot): ActivatedRouteSnapshot => { let routeWithDSOId = route; while (hasNoValue(routeWithDSOId.params.id) && hasValue(routeWithDSOId.parent)) { routeWithDSOId = routeWithDSOId.parent; @@ -29,7 +29,7 @@ const getRouteWithDSOId = (route: ActivatedRouteSnapshot): ActivatedRouteSnapsho -const defaultDSOGetObjectUrl: DSOGetObjectURlFn = (resolve: ResolveFn>>): StringGuardParamFn => { +export const defaultDSOGetObjectUrl: DSOGetObjectURlFn = (resolve: ResolveFn>>): StringGuardParamFn => { return (route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable => { const routeWithObjectID = getRouteWithDSOId(route); return (resolve(routeWithObjectID, state) as Observable>).pipe(