Package org.apache.sling.jackrabbit.usermanager

# Interface AuthorizablePrivilegesInfo

public interface AuthorizablePrivilegesInfo

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`AuthorizablePrivilegesInfo.PropertyUpdateTypes`
An enumeration of the possible types of property changes

## Method Summary

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`
`canChangePasswordWithoutOldPassword(@NotNull javax.jcr.Session jcrSession, @NotNull String userId)`
Checks whether the current user has been granted privileges to change the password of the specified user without knowing the current password of the 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 Details

### 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

### canChangePasswordWithoutOldPassword

default boolean canChangePasswordWithoutOldPassword(@NotNull @NotNull javax.jcr.Session jcrSession, @NotNull @NotNull String userId)
Checks whether the current user has been granted privileges to change the password of the specified user without knowing the current password of the 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