Adobe-Marketing-Cloud / aem-sample-we-retail

🚫 We.Retail has been archived, see instead the WKND Guide:
https://github.com/adobe/aem-guides-wknd
Apache License 2.0
123 stars 141 forks source link

AccessDeniedException when editing we.retail templates as non-admin user #92

Closed marcpf closed 8 years ago

marcpf commented 8 years ago

Hi I added permissions for the templates and policies in /conf/we-retail, see PR https://github.com/Adobe-Marketing-Cloud/aem-sample-we-retail/pull/91.

While testing those changes, I tried to create and edit a we.retail template with a non-admin user. It turns out there is an issue with the WeRetailCommerceSessionImpl. This class's super constructor is at some point initializes the LanguageManagerImpl class with the following resource:

/conf/we-retail/settings/wcm/templates/t1/structure/jcr:content

Then the LanguageManager then travels this tree upwards until it finds "jcr:content/jcr:language". The problem is that /conf is locked down in general, and template authors are not allowed to read /conf/we-retail/settings/wcm and above. This leads to AccessDeniedExceptions and this seem's to break the template editing.

Somehow this sounds like a general issue with LanguageManager and /conf resources in general. But I was wondering how this is expected to work in the context of we.retail. Things like:

marcpf commented 8 years ago

This issue is a false alarm. The AccessDeniedException is properly catched and logged and does not seem to be the root cause for the editing issue I experience. Please apologize the noise.