Ejemplo n.º 1
0
  @Override
  public void delete(int id) {
    if (!authService.isUserAuthorized(AuthConstants.ROLE_ADMIN, id)) {
      throw new NotAuthorizedException();
    }

    try {
      // Let FK handle profile dependencies
      profilePersister.delete(id);
    } catch (GeneralException ignored) {
      throw new BadRequestException();
    }
  }