obj_moderation_permission.py 382 Bytes
Newer Older
1 2 3 4 5
import json
from os.path import join, realpath, dirname


current_dir = dirname(realpath(__file__))
6
with open(join(current_dir, "OBJ_MODERATION_PERMISSIONS.json"), "r") as f:
7 8 9 10 11
    tmp = json.load(f)

OBJ_MODERATION_PERMISSIONS = {}

for key in tmp:
12
    OBJ_MODERATION_PERMISSIONS[key] = tmp[key]["level"]
Florent Chehab's avatar
Florent Chehab committed
13 14

DEFAULT_OBJ_MODERATION_LV = OBJ_MODERATION_PERMISSIONS["authenticated_user"]