Class PrivilegeRenderCondition
java.lang.Object
com.adobe.granite.ui.components.rendercondition.PrivilegeRenderCondition
- All Implemented Interfaces:
RenderCondition
A condition that decides based on
AccessControlManager.hasPrivileges(String, Privilege[]).-
Constructor Summary
ConstructorsConstructorDescriptionPrivilegeRenderCondition(AccessControlManager acm, String path, String[] privilegeNames) PrivilegeRenderCondition(AccessControlManager acm, String path, Privilege[] privileges) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()Returnstrueif the component should be rendered;falseotherwise.
-
Constructor Details
-
PrivilegeRenderCondition
public PrivilegeRenderCondition(@Nonnull AccessControlManager acm, @Nonnull String path, @Nonnull String[] privilegeNames) throws RepositoryException - Throws:
RepositoryException
-
PrivilegeRenderCondition
public PrivilegeRenderCondition(@Nonnull AccessControlManager acm, @Nonnull String path, @Nonnull Privilege[] privileges)
-
-
Method Details
-
check
Description copied from interface:RenderConditionReturnstrueif the component should be rendered;falseotherwise.- Specified by:
checkin interfaceRenderCondition- Returns:
trueif the component should be rendered,falseotherwise- Throws:
ServletException- in case a servlet error occurs
-