public interface EventAuthorizer
Modifier and Type | Field and Description |
---|---|
static EventAuthorizer |
DENY_ALL |
static EventAuthorizer |
GRANT_ALL |
Modifier and Type | Method and Description |
---|---|
void |
authorize(ProvenanceEventRecord event)
Authorizes the current user for the specified action on the specified resource.
|
default java.util.List<ProvenanceEventRecord> |
filterUnauthorizedEvents(java.util.List<ProvenanceEventRecord> events)
Filters out any events that the user is not authorized to access
|
boolean |
isAuthorized(ProvenanceEventRecord event)
Determines whether or not the has access to the given Provenance Event.
|
default java.util.Set<ProvenanceEventRecord> |
replaceUnauthorizedWithPlaceholders(java.util.Set<ProvenanceEventRecord> events)
Returns a Set of provenance events for which any of the given events that the user does not
have access to has been replaced by a placeholder event
|
static final EventAuthorizer GRANT_ALL
static final EventAuthorizer DENY_ALL
boolean isAuthorized(ProvenanceEventRecord event)
event
- the event to authorizevoid authorize(ProvenanceEventRecord event) throws AccessDeniedException
event
- the event to authorizeAccessDeniedException
- if the user is not authorizeddefault java.util.List<ProvenanceEventRecord> filterUnauthorizedEvents(java.util.List<ProvenanceEventRecord> events)
events
- the events to filtereddefault java.util.Set<ProvenanceEventRecord> replaceUnauthorizedWithPlaceholders(java.util.Set<ProvenanceEventRecord> events)
events
- the events to filter