How do you properly allow anonymous view permissions of a clientlib located inside the components directory? | Adobe Higher Education
Skip to main content
Level 2
January 5, 2017
Resuelto

How do you properly allow anonymous view permissions of a clientlib located inside the components directory?

  • January 5, 2017
  • 2 respuestas
  • 675 visualizaciones

Inside /apps/myproject/components/content/mycomponent I have a mycomponent.html file and a ClientLibraryFolder. In my html file I have:

<sly data-sly-use.myComponent="myComponent.js" data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}" id="${myComponent.id}" /> <sly data-sly-call="${clientLib.all @ categories='myproject.components.content.mycomponent'}" />

Which does transpile to importing the script from myproject/components/content/mycomponent

The issue that I'm having though is on the author and dispatcher servers. If I'm logged in as an administrator, my clientlibraries render, but if I'm not an administrator, then I don't have sufficient permissions to access that directory. I could embed these libraries to the base clientlib, but then I'd be loading every library to the client, regardless if the component that uses it is present on the page or not. 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Feike_Visser1

Here an article I wrote on this:

http://blogs.adobe.com/experiencedelivers/experience-management/clientlibs-explained-example/

2 respuestas

Feike_Visser1
Adobe Employee
Adobe Employee
January 5, 2017

You can use the embed-property to include to clientlibs from /apps into a clientlib located in /etc

I wouldn't go for the route to access items in /apps

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeRespuesta
Adobe Employee
January 5, 2017