forked from MarseyWorld/MarseyWorld
rename cache purge things to include prefix
parent
22af7f3bfc
commit
8d51980dca
|
@ -176,8 +176,8 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'SITE_SETTINGS_SIDEBARS_BANNERS_BADGES': 3,
|
||||
'SITE_SETTINGS_SNAPPY_QUOTES': 3,
|
||||
'SITE_SETTINGS_UNDER_ATTACK': 3,
|
||||
'CACHE_PURGE_CDN': 3,
|
||||
'CACHE_DUMP_INTERNAL': 2,
|
||||
'SITE_CACHE_PURGE_CDN': 3,
|
||||
'SITE_CACHE_DUMP_INTERNAL': 2,
|
||||
'DOMAINS_BAN': 3,
|
||||
'NOTIFICATIONS_HOLE_INACTIVITY_DELETION': 2,
|
||||
'NOTIFICATIONS_HOLE_CREATION': 2,
|
||||
|
|
|
@ -471,7 +471,7 @@ def change_settings(v, setting):
|
|||
|
||||
|
||||
@app.post("/admin/purge_cache")
|
||||
@admin_level_required(PERMS['CACHE_PURGE_CDN'])
|
||||
@admin_level_required(PERMS['SITE_CACHE_PURGE_CDN'])
|
||||
def purge_cache(v):
|
||||
online = cache.get(ONLINE_STR)
|
||||
cache.clear()
|
||||
|
@ -1386,7 +1386,7 @@ def admin_distinguish_comment(c_id, v):
|
|||
else: return {"message": "Comment undistinguished!"}
|
||||
|
||||
@app.get("/admin/dump_cache")
|
||||
@admin_level_required(PERMS['CACHE_DUMP_INTERNAL'])
|
||||
@admin_level_required(PERMS['SITE_CACHE_DUMP_INTERNAL'])
|
||||
def admin_dump_cache(v):
|
||||
online = cache.get(ONLINE_STR)
|
||||
cache.clear()
|
||||
|
|
|
@ -139,8 +139,9 @@
|
|||
<label class="custom-control-label" for="under_attack">Under attack mode</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');" style="margin-bottom: 2em;">PURGE CACHE</button>
|
||||
{% if v.admin_level >= PERMS['SITE_CACHE_PURGE_CDN'] %}
|
||||
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');" style="margin-bottom: 2em;">PURGE CACHE</button>
|
||||
{% endif %}
|
||||
<br>
|
||||
{% if SITE_NAME == 'PCM' and v.admin_level >= PERMS['PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES'] %}
|
||||
<button class="btn btn-primary" onclick="post_toast(this,'/kippy');" style="margin-bottom: 2em;">Print 10k Marseybux</button>
|
||||
|
|
Loading…
Reference in New Issue