Expand my Community achievements bar.

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)