User user = getActiveUser();
if (authManager.authorize(user, perm)) {
logResult(AuthResult.allow("Global check allowed", user, perm, null));
} else {
logResult(AuthResult.deny("Global check failed", user, perm, null));
throw new AccessDeniedException("Insufficient permissions for user '" +
(user != null ? user.getShortName() : "null") +"' (global, action=" +
perm.toString() + ")");
}
}