diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index dd9444555a..b9fb66ddd0 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -384,6 +384,8 @@ PERMS = { # Minimum admin_level to perform action. 'CLAIM_REWARDS_ALL_USERS': 4, 'IGNORE_AWARD_IMMUNITY': 4, 'INSERT_TRANSACTION': 4, + + 'VIEW_EMAILS': 5, } FEATURES = { diff --git a/files/routes/login.py b/files/routes/login.py index d444f5fc22..11f726cf36 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -320,7 +320,7 @@ def sign_up_post(v): g.db.flush() if new_user.id == 5: - new_user.admin_level = 4 + new_user.admin_level = 5 new_user.coins = 100000000 new_user.marseybux = 100000000 session["history"] = [] diff --git a/files/templates/userpage/banner.html b/files/templates/userpage/banner.html index a6fc144fff..d602fb5a34 100644 --- a/files/templates/userpage/banner.html +++ b/files/templates/userpage/banner.html @@ -110,7 +110,7 @@ last active {{u.last_active_date}} {%- endif %} - {% if SITE_NAME == 'WPD' and v and v.id in [AEVANN_ID, CARP_ID] -%} + {% if SITE_NAME == 'WPD' and v and v.admin_level >= PERMS['VIEW_EMAILS'] -%}
Email: {{u.email}}
{%- endif %} @@ -413,7 +413,7 @@
last active {{u.last_active_date}} {%- endif %} - {% if SITE_NAME == 'WPD' and v and v.id in [AEVANN_ID, CARP_ID] -%} + {% if SITE_NAME == 'WPD' and v and v.admin_level >= PERMS['VIEW_EMAILS'] -%}
Email: {{u.email}}
{%- endif %}