public interface PermissionChecker
@Inject PermissionChecker permissionChecker;
Concrete implementations do not hold any state, but it's advised to get an instance through CDI or as an EJB.| Modifier and Type | Method and Description |
|---|---|
boolean |
isAllowedTo(Operation operation,
Resource resource)
|
boolean |
isAllowedTo(Operation operation,
Resource resource,
Persona persona)
|
boolean |
isAllowedTo(Operation operation,
String resourceId)
|
boolean |
isAllowedTo(Operation operation,
String resourceId,
Persona persona)
|
boolean isAllowedTo(Operation operation, Resource resource, Persona persona)
operation - the operation that is to be performed. Example: "create-metric".resource - the resource onto which the operation is to be performed. Example: "cpu-usage".persona - the persona that is about to perform the operation. Example: "jdoe".IllegalArgumentException - if any of the parameters is nullboolean isAllowedTo(Operation operation, String resourceId, Persona persona)
Persona has access to perform Operation on the given Resource.
Resource here is referenced by its ID.operation - the operation that is to be performed. Example: "create-metric".resourceId - the ID for the resource onto which the operation is to be performed. Example: "cpu-usage".persona - the persona that is about to perform the operation. Example: "jdoe".IllegalArgumentException - if any of the parameters is null or if the resourceId doesn't references an
existing resource.isAllowedTo(Operation, Resource, Persona)boolean isAllowedTo(Operation operation, Resource resource)
operation - the operation that is to be performed. Example: "create-metric".resource - the resource onto which the operation is to be performed. Example: "cpu-usage".IllegalArgumentException - if any of the parameters is nullisAllowedTo(Operation, Resource, Persona)boolean isAllowedTo(Operation operation, String resourceId)
Persona has access to perform Operation on the given
Resource. Resource here is referenced by its ID.operation - the operation that is to be performed. Example: "create-metric".resourceId - the ID for the resource onto which the operation is to be performed. Example: "cpu-usage".IllegalArgumentException - if any of the parameters is null or if the resourceId doesn't references an
existing resource.isAllowedTo(Operation, Resource, Persona)Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.