Class ReadPolicy
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.ReadPolicy
-
- All Implemented Interfaces:
AccessControlPolicy
,NamedAccessControlPolicy
public final class ReadPolicy extends java.lang.Object implements NamedAccessControlPolicy
-
-
Field Summary
Fields Modifier and Type Field Description static NamedAccessControlPolicy
INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
canAccessReadPolicy(@NotNull PermissionProvider permissionProvider, @NotNull java.lang.String... oakPaths)
Evaluates if aReadPolicy
is accessible for a session object.java.lang.String
getName()
Returns the name of the access control policy, which is JCR name and should be unique among the choices applicable to any particular node.static boolean
hasEffectiveReadPolicy(@NotNull java.util.Collection<java.lang.String> readPaths, @Nullable java.lang.String oakPath)
-
-
-
Field Detail
-
INSTANCE
public static final NamedAccessControlPolicy INSTANCE
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:NamedAccessControlPolicy
Returns the name of the access control policy, which is JCR name and should be unique among the choices applicable to any particular node.- Specified by:
getName
in interfaceNamedAccessControlPolicy
- Returns:
- the name of the access control policy. A JCR name.
-
hasEffectiveReadPolicy
public static boolean hasEffectiveReadPolicy(@NotNull @NotNull java.util.Collection<java.lang.String> readPaths, @Nullable @Nullable java.lang.String oakPath)
-
canAccessReadPolicy
public static boolean canAccessReadPolicy(@NotNull @NotNull PermissionProvider permissionProvider, @NotNull @NotNull java.lang.String... oakPaths)
Evaluates if aReadPolicy
is accessible for a session object. Note that this method does not verify if the specified paths point to existing/accessible trees.- Parameters:
permissionProvider
- A permission provider used for evaluating accessoakPaths
- The set of configured readable paths.- Returns:
true
if the given permission provider has READ_ACCESS_CONTROL granted on any of the specified readable oak paths;false
otherwise.
-
-