code: @Override
  	protected Boolean hasRole(ActionBean bean, Method handler, String role)
  	{
  		LOG.debug("Checking role " + role + " using " + bean);
  
  		String roleName;
  		String roleExpression;
  
  		Matcher ifTrigger = Pattern.compile("\\bif\\b").matcher(role);
  		if (ifTrigger.find())
  		{
  			roleName = role.substring(0, ifTrigger.start()).trim(); // Lose leading and trailing whitespace.
  			roleExpression = role.substring(ifTrigger.end()).trim(); // Lose leading and trailing whitespace.
  		}
  		else // The role does not contain a condition.
  		{
  			roleName = role;
  			roleExpression = null;
  		}
  
  		LOG.debug("The role name and its expression are " + roleName + " & " + String.valueOf(roleExpression));
  
  		// Check if the user has the required role.
  
  		Boolean hasRole = hasRoleName(bean, handler, roleName);
  
  		// If there is a limiting expression, restrict the role to cases where the expression evaluates to true.
  
  		if (hasRole != null && hasRole && roleExpression != null)
  		{
  			LOG.debug("Checking expression " + roleExpression);
  
  			Object value = evaluateRoleExpression(bean, roleExpression);
  			hasRole = value == null ? null : Boolean.TRUE.equals(value);
  		}
  
  		LOG.debug("Done checking role " + role + ": access is " + (hasRole ? "allowed" : "denied") + '.');
  		return hasRole;
  	}
docs: Determine if the current user has the specified role. Delegates to
  {@link #hasRoleName(ActionBean, Method, String)} to determine if the user has a role without
  using the expression; this method handles evaluating the expression.
  
  @param bean the current action bean
  @param handler the current event handler
  @param role the role to check
  @return {@code true} if the user has the role, and {@code false} otherwise