interface Authorizer extends AuthEnforcer {
/**
* Grants a principal authorization to perform a set of actions on an entity.
*
* @param entity the entity on which an action is being performed
* @param principal the Principal that performs the actions. This could be a user, group or a role
* @param actions the set of actions to grant
*/
void grant(EntityId entity, Principal principal, Set<Action> actions);
/**
* Grants a Principal authorization to perform all actions on an entity.
*
* @param entity the entity on which an action is being performed
* @param principal the Principal that performs the actions. This could be a user, group or a role
*/
void grant(EntityId entity, Principal principal, Set<Action> actions);
/**
* Revokes a principal's authorization to perform a set of actions on an entity.
*
* @param entity the entity on which an action is being performed
* @param principal the principal that performs the actions. This could be a user, group or a role
* @param actions the set of actions to revoke permissions on
*/
void revoke(EntityId entity, Principal principal, Set<Action> actions);
/**
* Revokes a principal's authorization to perform any action on an entity.
*
* @param entity the entity on which an action is being performed
* @param principal the principal that performs the actions. This could be a user, group or a role
*/
void revoke(EntityId entity, Principal Principalprincipal);
/**
* Revokes all principals' authorization to perform any action on an entity.
*
* @param entity the entity on which an action is being performed
*/
void revoke(EntityId entity);
} |