Skip to main content
Level 6
Mar 28, 2024 3:15 AM UTC
Question

Issues with accessing /apps path

Hello Community - We have some issues with accessing /apps path for the anonymous user. We have few components in our project in those component, we are using multiple references of /apps paths in it(i.e. See below). If we access the page as a logged in user, we are able to see the component but if we access the same page as an anonymous user using the publish url, we don't see the component.

 

Since the /apps path read access is restricted for anonymous user so we don't see the component loading on the page. If we grant read access to everyone group, we started seeing the component. I know we shouldn't grant any read permissions to /apps path due to security aspects, it is related to clientlibs, we can specify allowProxy so that we can access it using /etc.clientlibs but in this case it's not clientlibs, so can someone tell me how to address this scenario. also please note that creating service user and grant read access is not an option for this usecase.

<sly data-sly-use.test="/apps/project/components/content/.../test.html"/>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

Level 7
Mar 28, 2024 4:13 AM UTC

Hi @test1234567 

 

If you want to refer other component, then try below statement.

 

<sly data-sly-resource="${'image' @ resourceType='weretail/components/content/image'}"></sly>

<div data-sly-resource="${'/content/abc/us/en/author'}"></div>

Translate
Level 6
Mar 28, 2024 12:00 PM UTC

We already using the reference like below in the html, should we need to remove the /apps/ reference the below? We have to use data-sly-use only as we need this object to use it.

<sly data-sly-use.clientlib="/apps/project/components/content/sightly/templates/clientlib.html"  />

Translate
Level 7
Mar 28, 2024 12:17 PM UTC

Hi @test1234567 

 

I am not getting your intention.

 

Do not want to include clientlib? if yes, use this code

<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html"
data-sly-call="${clientlib.all @ categories=['abc.testName']}" />

Or, if your task is different, could you please explain?

Note: If you want to include other file content, then try this one:

<div data-sly-resource="${'/content/abc/us/en/author'}"></div>

Translate