No logging in as administator & moderator in anarchy mode

This commit is contained in:
mid 2024-08-05 22:08:19 +03:00
parent 6f5302043d
commit aa95418b70

View File

@ -19,9 +19,15 @@
worked = false
end
if worked and BigGlobe.cfg.anarchy == "ANARCHY" then
response:addHeader("Refresh", "3;url=" .. zzz)
response:statusCode(303)
if BigGlobe.cfg.anarchy == "ANARCHY" then
if u and u.privs > DB.USER_PRIVS_APPROVED then
worked = false
end
if worked then
response:addHeader("Refresh", "3;url=" .. zzz)
response:statusCode(303)
end
end
end
@ -30,9 +36,13 @@
{% function content() %}
{% if BigGlobe.cfg.anarchy == "ANARCHY" then %}
<p>In anarchy mode, anyone can be anything. Please wait..</p>
<p>If that doesn't work, <a href="{{ Escapes.htmlescape(zzz) }}">click here</a>.</p>
{% if worked and zzz then %}
<p>In anarchy mode, anyone can be anything. Please wait..</p>
<p>If that doesn't work, <a href="{{ Escapes.htmlescape(zzz) }}">click here</a>.</p>
{% else %}
<p>User doesn't exist.</p>
{% end %}
{% else %}
{% if worked then %}
<p>Link has been sent to {{ em and Escapes.htmlescape(em) }}. This page may be closed.</p>
@ -42,4 +52,4 @@
{% end %}
{% end %}
{# base.inc
{# base.inc