Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Hi friends,
I was design a page as below.
In this design have a Country field. I want the country list will be display only countries that the current AEM user have permission to access. I will create a tree folder or tree node for country and city. So, I will configuration for the user or user group can access to special country or city. The all country list and all city list call from the service API.
How to check the permission of the current AEM user from Signthly or JavaScript? Because, I want to check the permission of the current user with the country folder or note in AEM. After that, I will compare the country code in AEM with the country code from the service API to filter it to display in the country select list.
Please help me,
How to check the permission of the current AEM user from Signthly or JavaScript?
Thank you so much,
BienHV
Zugriffe
Antworten
Likes gesamt
Hi,
You can't don't it with Sightly alone.
You need to go for Java or Javascript.
Where you can read users permission against tree and push node that have read permission in list using JAVA and read those list in Sightly.
You can check
Privilege (Content Repository for Java Technology API Version 2.0)
https://jackrabbit.apache.org/oak/docs/security/permission.html
Thanks
Arun
Zugriffe
Antworten
Likes gesamt
Thank you for your help,
Could you help me how to get permission with JavaScript with Sightly? I know JavaScript and Sightly, I can use it.
Thanks & Best regards,
BienHV
Zugriffe
Antworten
Likes gesamt
You need data from the repository and I don't think that you can do that with HTL alone; you need to have a server-side model.
Jörg
Zugriffe
Antworten
Likes gesamt
Yes,
I need a server side with JavaScript or Java for sightly. However, I don't know how to get permission of the node from Java or JavaScript.
Could you help me how to do that?
Thank you so much!
Zugriffe
Antworten
Likes gesamt
You don't need to check permissions with the API, because every node and resource is already checked.
regards,
Jörg
Zugriffe
Antworten
Likes gesamt
I guess the best way is to create a small Sling model class to format the data in the way you want it. And regarding the permissions: You don't have to do anything. If you are working in a request, all Sling and JCR methods will only return resources and nodes for which the current user has read access to. The filtering and permission checks are done implicitly.
regards,
Jörg
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Like
Antworten
Zugriffe
Likes
Antworten
Zugriffe
Like
Antworten