org.rhq.enterprise.server.authz
Class RequiredPermissionsInterceptor
java.lang.Object
org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor
public class RequiredPermissionsInterceptor
- extends java.lang.Object
An EJB3 interceptor that checks to ensure a given Subject has all of the global permissions that are
specified via the RequiredPermissions annotation on the method to be invoked. If the method being invoked is
not annotated with RequiredPermissions or it has an empty list of permissions, this interceptor passes the
security check immediately. Otherwise, the method must have a Subject as its first parameter - that
Subject will be checked to see if it has all the permissions required. If it does not, or if there is no
Subject as the method's first parameter, this interceptor throws an exception and does not allow the method
to be invoked.
- Author:
- John Mazzitelli
|
Method Summary |
java.lang.Object |
checkRequiredPermissions(javax.interceptor.InvocationContext invocation_context)
Checks to ensure the method can be invoked. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequiredPermissionsInterceptor
public RequiredPermissionsInterceptor()
checkRequiredPermissions
public java.lang.Object checkRequiredPermissions(javax.interceptor.InvocationContext invocation_context)
throws java.lang.Exception
- Checks to ensure the method can be invoked.
- Parameters:
invocation_context - the invocation context
- Returns:
- the results of the invocation
- Throws:
java.lang.Exception - if an error occurred further down the interceptor stack
PermissionException - if the security check fails
Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.