Merge main into coach: v1.2.6 plus die Backlog-Runde, Locale-Union, CI laeuft jetzt auch auf coach
This commit is contained in:
commit
8d3f667c89
86 files changed
+8924
-221
No files matched your search
+6
-1
@@ -23,6 +23,11 @@ const RP_NAME = process.env.RP_NAME || 'openGym';
|
||||
// code the admin generates. Both default off so a fresh self-hosted instance stays open.
|
||||
const ADMIN_UIDS = (process.env.ADMIN_UIDS || '').split(',').map(s => s.trim()).filter(Boolean);
|
||||
const INVITE_ONLY = /^(1|true|yes|on)$/i.test(process.env.INVITE_ONLY || '');
|
||||
// Guest mode ("Continue without account") keeps everything in the browser and never touches this
|
||||
// server — but on an instance meant for a known set of people, an entrance nobody can walk back
|
||||
// out of is still the wrong front door (#42). Default ON, so existing instances are unchanged;
|
||||
// the polarity is inverted from INVITE_ONLY because the safe default here is the permissive one.
|
||||
const ALLOW_GUEST = !/^(0|false|no|off)$/i.test(process.env.ALLOW_GUEST || '');
|
||||
// 90 days keeps someone who trains a few times a week permanently signed in without a stolen
|
||||
// cookie staying good for a year. Overridable because a family instance and one on the open
|
||||
// internet don't want the same number. Only affects cookies minted from now on — the expiry is
|
||||
@@ -283,7 +288,7 @@ const routes = {
|
||||
// the app it was before the feature existed.
|
||||
'GET /api/config': async (req, res) => {
|
||||
const coach = coachConfig.publicConfig();
|
||||
json(res, 200, { invite_only: INVITE_ONLY, ...(coach ? { coach } : {}) });
|
||||
json(res, 200, { invite_only: INVITE_ONLY, allow_guest: ALLOW_GUEST, ...(coach ? { coach } : {}) });
|
||||
},
|
||||
|
||||
'GET /api/me': async (req, res) => {
|
||||
|
||||
Reference in new issue
Block a user