* track-changes: list ranges of all docs in the review panel Overview
GET /project/:project_id/ranges returned document-updater's
/project/:id/ranges, which only covers docs currently loaded in Redis.
Comments and tracked changes in any doc nobody had opened since it was
last unloaded (or since document-updater restarted) were missing from
the Overview tab until that file was opened.
Flush the project's loaded docs to docstore first (POST
/project/:id/flush writes them back without unloading them), then read
the ranges of all non-deleted docs from docstore. After the flush
docstore is complete and current, so there is nothing to merge; this is
simpler than overlaying document-updater's live ranges on docstore's.
The response keeps the shape the frontend decodes ([{ id, ranges }]),
and docs without ranges get {} as document-updater returned for them.
The flush makes the request cost proportional to the number of loaded
docs with unflushed changes, and docstore unarchives the project's docs
if they were archived; on very large projects opening the Overview may
therefore be slower than before.
* track-changes: flush before listing tracked change authors
getChangesUsers read docstore directly. A tracked change still in
document-updater (not yet flushed to Mongo) was not seen, so the review
panel could not name its author once they left the project. Flush the
project first, as getAllRanges does since the previous commit.
Reported in ayaka-notes/ayakaleaf-pro#108.
Suspended users cannot log in to web, but their git-bridge personal
access tokens kept working for clone/pull/push. Treat a token whose
owner is suspended like an unknown token in GitBridgePATManager.getUserId,
which backs both /oauth/token/info and the token checks on the
/api/v0/docs routes, so git-bridge gets a 401.
The /git/ location proxied every path to git-bridge, which made its
internal routes reachable from the internet: /status, /health_check,
/metrics, /diags, /api/<project>/<key>/postback and the unauthenticated
DELETE /api/projects/<project id> used by web on project expiry.
Forward only /git/<24 hex project id>[.git]/... (the git smart-HTTP
endpoints, which git-bridge protects with Oauth2Filter) and return 404
for everything else under /git/. Web talks to git-bridge directly
(GIT_BRIDGE_HOST:GIT_BRIDGE_PORT), not through nginx, so it is not
affected.