// ------------------------------
LOG.debug("Account Policy enforcement");
try {
if (adminUser.equals(user.getUsername()) || anonymousUser.equals(user.getUsername())) {
throw new AccountPolicyException("Not allowed: " + user.getUsername());
}
// invalid username
for (Policy policy : getAccountPolicies(user)) {
// evaluate policy