Can we modify XPATH query's path? | Community
Skip to main content
New Participant
October 18, 2023

Can we modify XPATH query's path?

  • October 18, 2023
  • 3 replies
  • 711 views

Hi,

userMgr.findAuthorizables method has a built-in XPATH query. Is it possible to modify the root node for search in it?

 

Query looks something like - 

/jcr:root/home//element(*)[@jcr:primaryType='rep:User']

 

If I want to search under /home/users/a, can I make this change?

 

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

3 replies

joerghoh
Employee
October 24, 2023

This is not possible. What do you want to achieve with this API call, for which you would need to tweak this query?

kautuk_sahni
Employee
October 19, 2023

@goyalkritika Did you find the suggestions from Aanchal helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
aanchal-sikka
New Participant
October 18, 2023

Hello @goyalkritika 

 

If you use case if to get specific users, you should probably make them members to a group. When you need this list, you can just get all members of this group.

 

I am doubtful you would be able to edit the query root

Aanchal Sikka