niming_backend/utils/platform_consts.py

18 lines
613 B
Python
Raw Normal View History

2024-11-18 02:47:25 +08:00
# Permission List
2024-11-19 21:22:01 +08:00
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"]
2024-11-18 02:47:25 +08:00
# Platform Setting Model
2024-11-19 21:22:01 +08:00
PLATFORM_SETTING_MODEL = {
2024-11-18 02:47:25 +08:00
"Check_Before_Post": [bool],
"JWT_Valid_Time": [int],
"Niming_Max_Word": [int],
"Attachment_Count": [int],
"Attachment_Size": [int],
"Allowed_MIME": [list, str],
}