Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit is happening now. Discover what's next in customer experience.
SOLVED

How to get if the user has read permission on a given path using code.

Avatar

Level 2

I want to get if the logged-in user has read permission to a specified path. Please suggest to achieve it via code.

1 Accepted Solution

Avatar

Correct answer by
Level 2

try this: 

session.checkPermission("/content/someNodePath", "read");

Ref: http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Session.html#checkPermission(java.lang.St..., java.lang.String)

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

try this: 

session.checkPermission("/content/someNodePath", "read");

Ref: http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Session.html#checkPermission(java.lang.St..., java.lang.String)