Interface AuthorizablePrivilegesInfo


  • public interface AuthorizablePrivilegesInfo
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean canAddGroup​(javax.jcr.Session jcrSession)
      Checks whether the current user has been granted privileges to add a new group.
      boolean canAddUser​(javax.jcr.Session jcrSession)
      Checks whether the current user has been granted privileges to add a new user.
      default boolean canChangePassword​(javax.jcr.Session jcrSession, String userId)
      Checks whether the current user has been granted privileges to change the password of the specified user.
      default boolean canDisable​(javax.jcr.Session jcrSession, String userId)
      Checks whether the current user has been granted privileges to disable the specified user.
      boolean canRemove​(javax.jcr.Session jcrSession, String principalId)
      Checks whether the current user has been granted privileges to remove the specified user or group.
      boolean canUpdateGroupMembers​(javax.jcr.Session jcrSession, String groupId)
      Checks whether the current user has been granted privileges to update the membership of the specified group.
      boolean canUpdateProperties​(javax.jcr.Session jcrSession, String principalId)
      Checks whether the current user has been granted privileges to update the properties of the specified user or group.
      default boolean canUpdateProperties​(javax.jcr.Session jcrSession, String principalId, AuthorizablePrivilegesInfo.PropertyUpdateTypes... propertyUpdateTypes)
      Checks whether the current user has been granted privileges to update the properties of the specified user or group.
    • Method Detail

      • canAddUser

        boolean canAddUser​(javax.jcr.Session jcrSession)
        Checks whether the current user has been granted privileges to add a new user.
        Parameters:
        jcrSession - the JCR session of the current user
        Returns:
        true if the current user has the privileges, false otherwise
      • canAddGroup

        boolean canAddGroup​(javax.jcr.Session jcrSession)
        Checks whether the current user has been granted privileges to add a new group.
        Parameters:
        jcrSession - the JCR session of the current user
        Returns:
        true if the current user has the privileges, false otherwise
      • canUpdateProperties

        boolean canUpdateProperties​(javax.jcr.Session jcrSession,
                                    String principalId)
        Checks whether the current user has been granted privileges to update the properties of the specified user or group. Equivalent of: #canUpdateProperties(Session, String, PropertyUpdateTypes.addProperty, PropertyUpdateTypes.addNestedProperty, PropertyUpdateTypes.alterProperty, PropertyUpdateTypes.removeProperty)
        Parameters:
        jcrSession - the JCR session of the current user
        principalId - the user or group id to check
        Returns:
        true if the current user has the privileges, false otherwise
      • canUpdateProperties

        default boolean canUpdateProperties​(javax.jcr.Session jcrSession,
                                            String principalId,
                                            AuthorizablePrivilegesInfo.PropertyUpdateTypes... propertyUpdateTypes)
        Checks whether the current user has been granted privileges to update the properties of the specified user or group.
        Parameters:
        jcrSession - the JCR session of the current user
        principalId - the user or group id to check
        propertyUpdateTypes - specify the types of property updates that may be supplied. See: AuthorizablePrivilegesInfo.PropertyUpdateTypes
        Returns:
        true if the current user has the privileges, false otherwise
      • canRemove

        boolean canRemove​(javax.jcr.Session jcrSession,
                          String principalId)
        Checks whether the current user has been granted privileges to remove the specified user or group.
        Parameters:
        jcrSession - the JCR session of the current user
        principalId - the user or group id to check
        Returns:
        true if the current user has the privileges, false otherwise
      • canUpdateGroupMembers

        boolean canUpdateGroupMembers​(javax.jcr.Session jcrSession,
                                      String groupId)
        Checks whether the current user has been granted privileges to update the membership of the specified group.
        Parameters:
        jcrSession - the JCR session of the current user
        groupId - the group id to check
        Returns:
        true if the current user has the privileges, false otherwise
      • canDisable

        default boolean canDisable​(javax.jcr.Session jcrSession,
                                   String userId)
        Checks whether the current user has been granted privileges to disable the specified user.
        Parameters:
        jcrSession - the JCR session of the current user
        userId - the user id to check
        Returns:
        true if the current user has the privileges, false otherwise
      • canChangePassword

        default boolean canChangePassword​(javax.jcr.Session jcrSession,
                                          String userId)
        Checks whether the current user has been granted privileges to change the password of the specified user.
        Parameters:
        jcrSession - the JCR session of the current user
        userId - the user id to check
        Returns:
        true if the current user has the privileges, false otherwise