Issues with accessing /apps path | Community
Skip to main content
Level 6
March 28, 2024
Question

Issues with accessing /apps path

  • March 28, 2024
  • 1 reply
  • 1030 views

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.

1 reply

Level 7
March 28, 2024

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>

Level 6
March 28, 2024

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"  />

Level 7
March 28, 2024

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>