/**
   * Constructs a administrator based upon the user associated with the current request context.
   *
   * @param context the current request context (contains the active user)
   * @throws NotAuthorizedException if the user does not have publishing rights
   */
  protected void checkRole(RequestContext context) throws NotAuthorizedException {

    // initialize
    User user = context.getUser();
    user.setKey(user.getKey());
    user.setLocalID(user.getLocalID());
    user.setDistinguishedName(user.getDistinguishedName());
    user.setName(user.getName());

    // establish credentials
    UsernamePasswordCredentials creds = new UsernamePasswordCredentials();
    creds.setUsername(user.getName());
    user.setCredentials(creds);

    user.setAuthenticationStatus(user.getAuthenticationStatus());
    assertAdministratorRole(user);
  }