Update routes.py
This commit is contained in:
parent
7383f4b131
commit
1e62f67b76
14
routes.py
14
routes.py
@ -108,13 +108,27 @@ def register_routes(app, ctx):
|
||||
MAX_WEBSITE_LENGTH = constants["MAX_WEBSITE_LENGTH"]
|
||||
MAX_LOCATION_LENGTH = constants["MAX_LOCATION_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"]
|
||||
ROOM_VISIBILITIES = constants["ROOM_VISIBILITIES"]
|
||||
ROLES = constants["ROLES"]
|
||||
STATUSES = constants["STATUSES"]
|
||||
|
||||
PRIVATE_ACCESS_KEY = ctx["PRIVATE_ACCESS_KEY"]
|
||||
|
||||
ROLES = constants["ROLES"]
|
||||
STATUSES = constants["STATUSES"]
|
||||
|
||||
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):
|
||||
return richer_message_payload(
|
||||
get_db,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user