obj_moderation_permission.py 382 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
import json
from os.path import join, realpath, dirname


current_dir = dirname(realpath(__file__))
with open(join(current_dir, 'OBJ_MODERATION_PERMISSIONS.json'), 'r') as f:
    tmp = json.load(f)

OBJ_MODERATION_PERMISSIONS = {}

for key in tmp:
    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"]