mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 18:03:54 +00:00
Merge pull request #2021 from hhamalai/configurable_invitation_token_age
Make invitation token max age configurable
This commit is contained in:
commit
73540175d8
@ -31,7 +31,7 @@ def reset_link_for_user(user):
|
|||||||
|
|
||||||
|
|
||||||
def validate_token(token):
|
def validate_token(token):
|
||||||
max_token_age = 60 * 60 * 24 * 7 # 1 week
|
max_token_age = settings.INVITATION_TOKEN_MAX_AGE
|
||||||
return serializer.loads(token, max_age=max_token_age)
|
return serializer.loads(token, max_age=max_token_age)
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,6 +94,7 @@ SCHEMAS_REFRESH_SCHEDULE = int(os.environ.get("REDASH_SCHEMAS_REFRESH_SCHEDULE",
|
|||||||
AUTH_TYPE = os.environ.get("REDASH_AUTH_TYPE", "api_key")
|
AUTH_TYPE = os.environ.get("REDASH_AUTH_TYPE", "api_key")
|
||||||
PASSWORD_LOGIN_ENABLED = parse_boolean(os.environ.get("REDASH_PASSWORD_LOGIN_ENABLED", "true"))
|
PASSWORD_LOGIN_ENABLED = parse_boolean(os.environ.get("REDASH_PASSWORD_LOGIN_ENABLED", "true"))
|
||||||
ENFORCE_HTTPS = parse_boolean(os.environ.get("REDASH_ENFORCE_HTTPS", "false"))
|
ENFORCE_HTTPS = parse_boolean(os.environ.get("REDASH_ENFORCE_HTTPS", "false"))
|
||||||
|
INVITATION_TOKEN_MAX_AGE = int(os.environ.get("REDASH_INVITATION_TOKEN_MAX_AGE", 60 * 60 * 24 * 7))
|
||||||
|
|
||||||
MULTI_ORG = parse_boolean(os.environ.get("REDASH_MULTI_ORG", "false"))
|
MULTI_ORG = parse_boolean(os.environ.get("REDASH_MULTI_ORG", "false"))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user