niming_backend/utils/platform_consts.py
2024-11-19 13:22:01 +00:00

18 lines
613 B
Python

# Permission List
PLIST = ["article.read", "article.pend", "article.del", "setting.edit"] # no permission:usermgr except root
PLIST_ROOT = PLIST + ["usermgr"]
# event type
EVENT_TYPE_GENERAL = ["newpost", "delpost"]
EVENT_TYPE_ADMIN = ["login", "user.create", "user.delete", "article.delete", "article.pend", "setting.modify"]
EVENT_TYPE_SERVER = ["server.start"]
# Platform Setting Model
PLATFORM_SETTING_MODEL = {
"Check_Before_Post": [bool],
"JWT_Valid_Time": [int],
"Niming_Max_Word": [int],
"Attachment_Count": [int],
"Attachment_Size": [int],
"Allowed_MIME": [list, str],
}