Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

 

arunpatidar_2-1705568053831.png

 

 

arunpatidar_0-1705567973586.png

 



Arun Patidar

View solution in original post

10 Replies

Avatar

Community Advisor

Hi @HughShao 
Try with 

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



Arun Patidar

Avatar

Level 2

Hi @arunpatidar 

Still not working. Looks like not able to input in this format.

Avatar

Level 2

Getting error with this format for rep:itemNames

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

Avatar

Correct answer by
Community Advisor

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.

 

arunpatidar_2-1705568053831.png

 

 

arunpatidar_0-1705567973586.png

 



Arun Patidar

Avatar

Level 2

Adding them one by one is working for me! Thank you.

It looks like rep:itemNames only return the node with no properties. Is there any easy to way to read properties, please?

Avatar

Community Advisor

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

Java example : 

arunpatidar_0-1705586738762.png

 



Arun Patidar

Avatar

Level 2

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.

HughShao_0-1705645999245.png

 

Avatar

Community Advisor

Hi @HughShao 
There are no other information except rep:itemNames stored in the node to show in UI

 

arunpatidar_0-1705660547663.png

 



Arun Patidar

Avatar

Community Advisor

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]






Avatar

Level 2

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? ^.^