forked from MarseyWorld/MarseyWorld
rename perm to be more clear
parent
3a0cc36679
commit
84cebda61f
|
@ -495,7 +495,7 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'VIEW_PATRONS': 5,
|
||||
'BLACKJACK_NOTIFICATIONS': 5,
|
||||
'IGNORE_BADGE_BLACKLIST': 5,
|
||||
'VIEW_DM_IMAGES': 5,
|
||||
'enable_dm_images': 5,
|
||||
'SEE_GHOST_VOTES': 5,
|
||||
|
||||
'MODS_EVERY_HOLE': 6,
|
||||
|
|
|
@ -44,7 +44,7 @@ def loggedout_list(v):
|
|||
@app.get('/admin/dm_images')
|
||||
@limiter.limit(DEFAULT_RATELIMIT)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
||||
@admin_level_required(PERMS['VIEW_DM_IMAGES'])
|
||||
@admin_level_required(PERMS['enable_dm_images'])
|
||||
def dm_images(v):
|
||||
with open(f"{LOG_DIRECTORY}/dm_images.log", "r", encoding="utf-8") as f:
|
||||
items=f.read().split("\n")[:-1]
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<h4>Content</h4>
|
||||
<ul>
|
||||
{% if v.admin_level >= PERMS['VIEW_DM_IMAGES'] %}
|
||||
{% if v.admin_level >= PERMS['enable_dm_images'] %}
|
||||
<li><a href="/admin/dm_images">DM Images</a></li>
|
||||
{% endif %}
|
||||
<li><a href="/log">Moderation Log</a></li>
|
||||
|
|
Loading…
Reference in New Issue