From 4fdccc331a2be8d3680a60f4b1021634e8610469 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 5 Oct 2022 23:02:27 -0700 Subject: [PATCH] view last active in template --- files/helpers/const.py | 1 + files/templates/userpage.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 548f96a90..db5d856d7 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -162,6 +162,7 @@ PERMS = { # Minimum admin_level to perform action. 'VIEW_ACTIVE_USERS': 2, 'VIEW_ALL_USERS': 2, 'VIEW_ALT_VOTES': 2, + 'VIEW_LAST_ACTIVE': 2, 'VIEW_PATRONS': 3, # note: extra check for Aevann, carp, or snakes 'PRINT_MARSEYBUX_FOR_KIPPY_ON_PCMEMES': 3, # note: explicitly disabled on rDrama 'MERGE_USERS': 3, # note: extra check for Aevann diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 51a817f1f..48d9f6e44 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -151,7 +151,7 @@ joined {{u.created_date}} - {% if v and v.admin_level >= 2 -%} + {% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%} last active {{u.last_active_date}} {%- endif %} @@ -515,7 +515,7 @@
joined {{u.created_date}} - {% if v and v.admin_level >= 2 -%} + {% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
last active {{u.last_active_date}} {%- endif %}