Support multiple allowed users for write access

MAPTOOL_ALLOWED_GITEA_USER now accepts a comma-separated list of
Gitea usernames instead of just one, for when more than one person
needs upload/delete/move access.
This commit is contained in:
randy committed 2026-08-27 18:25:31 +02:00
1 parent e13d1a1e97
commit 260006ad65
3 files changed
+23 -16

No files matched your search

+11 -6
View File
@@ -95,12 +95,17 @@ it every push would silently log everyone out every time `main`
changes) — generate it once (`openssl rand -hex 32`) and store that
same value as the secret from then on, don't regenerate per-deploy.
Register the OAuth2 application on the Gitea side (as the
`MAPTOOL_ALLOWED_GITEA_USER` account): *Settings → Applications →
Manage OAuth2 Applications → Create a new OAuth2 Application*, with
redirect URI `https://map.priesol.net/auth/callback`. That gives you
the client id/secret to store as the two `GITEA_OAUTH_*` secrets
above.
Register the OAuth2 application once, under any one Gitea account
(doesn't need to be an allowed user itself — any Gitea account can
authenticate through it, `MAPTOOL_ALLOWED_GITEA_USER` is what actually
decides who gets write access): *Settings → Applications → Manage
OAuth2 Applications → Create a new OAuth2 Application*, with redirect
URI `https://map.priesol.net/auth/callback`. That gives you the client
id/secret to store as the two `OAUTH_CLIENT_*` secrets above.
`MAPTOOL_ALLOWED_GITEA_USER` itself is a comma-separated list of Gitea
usernames, e.g. `randy,friend1,friend2` — not their emails, the
`login` field from Gitea's `/api/v1/user`.
== CI deploy job