Update routes.py
This commit is contained in:
parent
7383f4b131
commit
1e62f67b76
14
routes.py
14
routes.py
@ -108,12 +108,26 @@ def register_routes(app, ctx):
|
|||||||
MAX_WEBSITE_LENGTH = constants["MAX_WEBSITE_LENGTH"]
|
MAX_WEBSITE_LENGTH = constants["MAX_WEBSITE_LENGTH"]
|
||||||
MAX_LOCATION_LENGTH = constants["MAX_LOCATION_LENGTH"]
|
MAX_LOCATION_LENGTH = constants["MAX_LOCATION_LENGTH"]
|
||||||
MAX_CUSTOM_CSS_LENGTH = constants["MAX_CUSTOM_CSS_LENGTH"]
|
MAX_CUSTOM_CSS_LENGTH = constants["MAX_CUSTOM_CSS_LENGTH"]
|
||||||
|
MAX_PROFILE_BADGE_LENGTH = constants["MAX_PROFILE_BADGE_LENGTH"]
|
||||||
MAX_OWNED_TEAMS_PER_USER = constants["MAX_OWNED_TEAMS_PER_USER"]
|
MAX_OWNED_TEAMS_PER_USER = constants["MAX_OWNED_TEAMS_PER_USER"]
|
||||||
ROOM_VISIBILITIES = constants["ROOM_VISIBILITIES"]
|
ROOM_VISIBILITIES = constants["ROOM_VISIBILITIES"]
|
||||||
ROLES = constants["ROLES"]
|
ROLES = constants["ROLES"]
|
||||||
STATUSES = constants["STATUSES"]
|
STATUSES = constants["STATUSES"]
|
||||||
|
|
||||||
|
PRIVATE_ACCESS_KEY = ctx["PRIVATE_ACCESS_KEY"]
|
||||||
|
|
||||||
|
ROLES = constants["ROLES"]
|
||||||
|
STATUSES = constants["STATUSES"]
|
||||||
|
|
||||||
html_module = ctx["html"]
|
html_module = ctx["html"]
|
||||||
|
|
||||||
|
def private_access_key_valid(candidate: object) -> bool:
|
||||||
|
configured = (PRIVATE_ACCESS_KEY or "").strip()
|
||||||
|
if not configured:
|
||||||
|
return True
|
||||||
|
if not isinstance(candidate, str):
|
||||||
|
return False
|
||||||
|
return candidate.strip() == configured
|
||||||
|
|
||||||
def build_message_payload(row, user):
|
def build_message_payload(row, user):
|
||||||
return richer_message_payload(
|
return richer_message_payload(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user