org.jboss.seam.security.permission
Class RuleBasedPermissionResolver
java.lang.Object
org.jboss.seam.security.permission.RuleBasedPermissionResolver
- All Implemented Interfaces:
- Serializable, PermissionResolver
@Requires(value="org.drools.KnowledgeBase")
@SessionScoped
public class RuleBasedPermissionResolver
- extends Object
- implements PermissionResolver, Serializable
A permission resolver that uses a Drools rule base to perform permission checks
- Author:
- Shane Bryzak
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RuleBasedPermissionResolver
public RuleBasedPermissionResolver()
init
@Inject
public void init()
hasPermission
public boolean hasPermission(Object resource,
String permission)
- Performs a permission check for the specified name and action
- Specified by:
hasPermission
in interface PermissionResolver
- Parameters:
target
- Object The target of the permission checkaction
- String The action to be performed on the target
- Returns:
- boolean True if the user has the specified permission
filterSetByAction
public void filterSetByAction(Set<Object> targets,
String action)
- Specified by:
filterSetByAction
in interface PermissionResolver
checkConditionalRole
public boolean checkConditionalRole(String roleName,
Object target,
String action)
unAuthenticate
public void unAuthenticate(@Observes
PostLoggedOutEvent event)
getSecurityContext
public org.drools.runtime.StatefulKnowledgeSession getSecurityContext()
setSecurityContext
public void setSecurityContext(org.drools.runtime.StatefulKnowledgeSession securityContext)
getSecurityRules
public org.drools.KnowledgeBase getSecurityRules()
setSecurityRules
public void setSecurityRules(org.drools.KnowledgeBase securityRules)
setUserAccountInSecurityContext
public void setUserAccountInSecurityContext(@Observes
PostAuthenticateEvent event)
- Post-authentication event observer
Copyright © 2011 Seam Framework. All Rights Reserved.