niming_backend/utils/platform_consts.py
2024-11-19 15:29:01 +00:00

20 lines
612 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"],
"admin": ["login", "user.create", "user.delete", "article.delete", "article.pend", "setting.modify"],
"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],
}