@RequestParam("id") User user
) throws Exception {
Template tmpl = Template.getTemplate(request);
if (!tmpl.isSessionAuthorized()) {
throw new AccessViolationException("Not autorized");
}
User currentUser = tmpl.getCurrentUser();
// Не модератор не может удалять чужие аватары
if (!tmpl.isModeratorSession() && currentUser.getId()!=user.getId()) {
throw new AccessViolationException("Not permitted");
}
if (user.getPhoto() != null && userDao.resetUserpic(user, currentUser)) {
logger.info("Clearing " + user.getNick() + " userpic by " + currentUser.getNick());
} else {