[AEMasaCS]How to input the values of rep:itemNames in the permission settings | Community
Skip to main content
Level 2
January 18, 2024
Solved

[AEMasaCS]How to input the values of rep:itemNames in the permission settings

  • January 18, 2024
  • 2 replies
  • 1637 views

Hi All,

I am trying to utilize the restrictions to limit the access to the nodes in permission settings. However, when I look into rep:itemNames, I cannot find the right way to input multiple values in permissions module of AEM console.

Not working if I input:
rep:itemNames = "au,us,fr"       //when clicking edit, they are displayed as: rep:itemNames=au, rep:itemNames=us, ....
or
rep:itemNmaes = "au, us, fr"
or
rep:itemNmaes = "au", "us", "fr"

I cannot find any useful documents easily. Any ideas, please? 

Thanks.

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

Ahh ok, you are trying from AEM console

You need add one by one and after that you would open it again, it would combine the field.
example, I added ae and de separately and after opened it is combined.

 

 

 

 

2 replies

arunpatidar
Community Advisor
Community Advisor
January 18, 2024

Hi @hughshao 
Try with 

rep:itemNames = "[au,us,fr]"

Arun Patidar
HughShaoAuthor
Level 2
January 18, 2024

Getting error with this format for rep:itemNames

javax.jcr.ValueFormatException: Invalid name: [au, us, fr]

HughShaoAuthor
Level 2
January 19, 2024

Hi @hughshao 
how are you reading this properties ? using java?

Java example : 

 


Hi @arunpatidar 

No, I am not using the code. Instead, I am using AEM console as you said. And in AEM console, I'm setting the restrictions like below for an user group. However, when viewing as this group user, I find only able to see the node name but no properties like jcr:title, etc.

 

Raja_Reddy
Community Advisor
Community Advisor
January 18, 2024

Hi @hughshao 
Try like this
rep:itemNames = "au,us,fr"
This should work, and when you edit it, you may see each value as a separate entry.

Multiple Lines:

rep:itemNames = au
rep:itemNames = us
rep:itemNames = fr

Array Syntax:
rep
:itemNames = [au, us, fr]




HughShaoAuthor
Level 2
January 18, 2024

Hi @raja_reddy ,

rep:itemNames = "au,us,fr" is not wokring. However, when edit it, as you say, it does display as sperate ashout: 

rep:itemNames="au",rep:itemNames="us",rep:itemNames="fr"

After saving it without any changes, it is working now... Just the format looks like weird.

Also, rep:itemNames is only reading the node instead of its properties (e.g. node title). Any idea how to get node title together? ^.^