niming_backend/utils/platform_consts.py

21 lines
641 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
2024-11-19 23:29:01 +08:00
EVENT_TYPE = {
2024-12-09 03:24:22 +08:00
"general": ["newpost", "delpost", "newcomment", "delcomment"],
2024-11-19 23:29:01 +08:00
"admin": ["login", "user.create", "user.delete", "article.delete", "article.pend", "setting.modify"],
"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],
2024-12-09 03:24:22 +08:00
}