code: protected void validatePrivilegedUser(HttpServletRequest req) {
          if (!getRemoteUser(req).isPrivileged()) {
              throw new WebApplicationException(Status.FORBIDDEN.getReasonPhrase(), Status.FORBIDDEN);
          }
      }
docs: Validates that the user making the request is a privileged user.
  
  @param   req  - Http Request
  
  @throws  WebApplicationException  Throws exception if user is not a privileged user.