diff --git a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java index ffd090ace..e3153c85f 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/restservices/shared/NodeUrls.java @@ -14,7 +14,7 @@ public NodeUrls(Node node, String requestedVersion) { repositoryBaseUrl = URLHelper.getBaseUrl(true); if(node.getAspects().contains(CCConstants.getValidLocalName(CCConstants.CCM_ASPECT_LTITOOL_NODE))){ generateLtiResourceLink = repositoryBaseUrl + "/rest/ltiplatform/v13/generateLoginInitiationFormResourceLink?nodeId=" + node.getRef().getId(); - if(Context.getCurrentInstance() != null && Context.getCurrentInstance().getSessionAttribute(CCConstants.AUTH_SINGLE_USE_NODEIDS) != null){ + if(Context.getCurrentInstance() != null){ if(Context.getCurrentInstance().isSingleUseNodeId(node.getRef().getId())){ //generate short living jwt try { diff --git a/Frontend/src/app/core-ui-module/render-helper.service.ts b/Frontend/src/app/core-ui-module/render-helper.service.ts index 09b28058f..050e1acf1 100644 --- a/Frontend/src/app/core-ui-module/render-helper.service.ts +++ b/Frontend/src/app/core-ui-module/render-helper.service.ts @@ -181,7 +181,11 @@ export class RenderHelperService { } private getCollectionsContainingNode(node: Node): Observable { - const id = this.getOriginalId(node); + let id = this.getOriginalId(node); + // a childobject can never be in a collection, but its parent may + if (node.aspects?.includes(RestConstants.CCM_ASPECT_IO_CHILDOBJECT)) { + id = node.parent?.id; + } return this.networkService.isFromHomeRepository(node).pipe( switchMap((home) => { if (home) {