*/
public static boolean canAccess(ServiceContext context,
String aclName,
String targetName){
ACL acl = ACLStore.getInstance().getACL(aclName);
if(acl == null){
/* if acl is not specified, user has access by default */
if(logger.isLoggable(Level.FINE))
logger.fine("acl not configured:" + aclName);
return true;
}
/* construct ACLContext from ServiceContext */
ACLContext aclContext = getACLContext(context, targetName);
if(acl.isAuthorized(aclContext, context.getUser())){
return true;
}
return false;
}