diff --git a/files/helpers/const.py b/files/helpers/const.py index 8523e3745..3cebf6469 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -138,6 +138,7 @@ PERMS = { # Minimum admin_level to perform action. 'FLAGS_VISIBLE': 0, 'FLAGS_VISIBLE_REPORTER': 0, 'FLAGS_REMOVE': 2, + 'CONTENT_THREADS': 3, } EMOJI_MARSEYS = True @@ -209,9 +210,9 @@ if SITE in ('rdrama.net', 'devrama.xyz'): MARSEY_THREAD = 37838 GAMBLING_THREAD = 39413 elif SITE == 'deuxrama.net': + SIDEBAR_THREAD = 175 BADGE_THREAD = 142 - if SITE in {'rdrama.net', 'devrama.xyz', 'deuxrama.net'}: HOLE_COST = 50000 HOLE_INACTIVITY_DELETION = True @@ -353,6 +354,10 @@ elif SITE == 'lgbdropthet.com': else: # localhost or testing environment implied pass +if SITE == 'deuxrama.net': + PERMS['HOLE_CREATE'] = 3 + PERMS['CONTENT_THREADS'] = 2 + bots = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID, BASEDBOT_ID} IMGUR_KEY = environ.get("IMGUR_KEY").strip() diff --git a/files/routes/comments.py b/files/routes/comments.py index 9af31cf9a..39f8931fc 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -195,7 +195,7 @@ def api_comment(v): file.save(oldname) image = process_image(oldname) if image == "": return {"error":"Image upload failed"} - if v.admin_level > 2 and level == 1: + if v.admin_level >= PERMS['CONTENT_THREADS'] and level == 1: if parent_post.id == SIDEBAR_THREAD: li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/sidebar'), key=lambda e: int(e.split('.webp')[0]))[-1] diff --git a/files/templates/sidebar_Deuxrama.html b/files/templates/sidebar_Deuxrama.html new file mode 100644 index 000000000..4c45416aa --- /dev/null +++ b/files/templates/sidebar_Deuxrama.html @@ -0,0 +1,34 @@ +