mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
* `GRIST_ANON_PLAYGROUND`: When set to 'false' deny anonymous users access to the home page * `GRIST_FORCE_LOGIN`: Much like `GRIST_ANON_PLAYGROUND` but don't support anonymous access at all (features like sharing docs publicly requires authentication) --------- Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
This commit is contained in:
@@ -850,10 +850,11 @@ export class FlexServer implements GristServer {
|
||||
baseDomain: this._defaultBaseDomain,
|
||||
});
|
||||
|
||||
const isForced = appSettings.section('login').flag('forced').readBool({
|
||||
const forceLogin = appSettings.section('login').flag('forced').readBool({
|
||||
envVar: 'GRIST_FORCE_LOGIN',
|
||||
});
|
||||
const forcedLoginMiddleware = isForced ? this._redirectToLoginWithoutExceptionsMiddleware : noop;
|
||||
|
||||
const forcedLoginMiddleware = forceLogin ? this._redirectToLoginWithoutExceptionsMiddleware : noop;
|
||||
|
||||
const welcomeNewUser: express.RequestHandler = isSingleUserMode() ?
|
||||
(req, res, next) => next() :
|
||||
|
||||
Reference in New Issue
Block a user