code: func (api OrganizationsAPI) ListUsersWithGrant(w http.ResponseWriter, r *http.Request) {
  	globalID := mux.Vars(r)["globalid"]
  	grantString := mux.Vars(r)["grant"]
  
  	grant := grants.Grant(grantString)
  	if err := grant.Validate(); err != nil {
  		log.Debug("Invalid grant: ", err)
  		http.Error(w, err.Error(), http.StatusBadRequest)
  		return
  	}
  
  	grantMgr := grants.NewManager(r)
  	grantObjs, err := grantMgr.GetByGrant(grant, globalID)
  	if err != nil && !db.IsNotFound(err) {
  		log.Error("Failed to look up users with grant: ", err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  
  	usernames := []string{}
  	for _, grantObj := range grantObjs {
  		usernames = append(usernames, grantObj.Username)
  	}
  
  	log.Debug("filtering users to those with an open authorization")
  	usernames, err = user.NewManager(r).FilterUsersWithAuthorizations(usernames, globalID)
  	if handleServerError(w, "filtering out users without authorization", err) {
  		return
  	}
  
  	userIdentifiers, err := organization.ConvertUsernamesToIdentifiers(usernames, validationdb.NewManager(r))
  	if err != nil {
  		log.Error("Failed to convert usernames to identifiers: ", err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  
  	w.Header().Set("Content-Type", "application/json")
  	w.WriteHeader(http.StatusOK)
  	json.NewEncoder(w).Encode(userIdentifiers)
  }
docs: // ListUsersWithGrant lists all users with a given grant