1
0
mirror of https://github.com/enpaul/keyosk.git synced 2024-11-05 06:07:06 +00:00
keyosk/keyosk/constants.py
Ethan Paul f59afcccf7 Add basic roundtrip test for domain serializer
Fix dumping and loading compatibility of domain model
Fix (untested) dumping and loading compatibility of account model
Loosen simple name regex requirements
2020-03-10 23:29:05 -04:00

18 lines
403 B
Python

"""Constant parameter definitions"""
DEFAULT_CONFIG_PATH = "/etc/keyosk/conf.toml"
ENV_CONFIG_PATH = "KYSK_CONF_PATH"
REGEX_FRIENDLY_NAME = r"^([a-z0-9]+)(-[a-z0-9]+)*$"
REGEX_DOMAIN_NAME = REGEX_FRIENDLY_NAME
REGEX_DOMAIN_ACCESS_LIST_NAME = REGEX_FRIENDLY_NAME
REGEX_DOMAIN_PERMISSION_NAME = REGEX_FRIENDLY_NAME
REGEX_DOMAIN_AUDIENCE = r"^[a-z][a-z0-9]{2,9}$"
REGEX_DOMAIN_TITLE = r"^.{1,30}$"