master
Aevann1 2022-03-05 21:46:47 +02:00
parent c86ebe6f47
commit 7d44f8456f
12 changed files with 26 additions and 15 deletions

View File

@ -154,7 +154,7 @@ class User(Base):
@lazy
def mods(self, sub):
return self.id == AEVANN_ID or bool(g.db.query(Mod.user_id).filter_by(user_id=self.id, sub=sub).one_or_none())
return self.admin_level == 3 or bool(g.db.query(Mod.user_id).filter_by(user_id=self.id, sub=sub).one_or_none())
@lazy
def exiled_from(self, sub):

View File

@ -24,6 +24,8 @@ def exile_post(v, pid):
u = p.author
if u.mods(sub): abort(403)
if u.admin_level < 2 and not u.exiled_from(sub):
exile = Exile(user_id=u.id, sub=sub, exiler_id=v.id)
g.db.add(exile)
@ -77,6 +79,8 @@ def exile_comment(v, cid):
u = c.author
if u.mods(sub): abort(403)
if u.admin_level < 2 and not u.exiled_from(sub):
exile = Exile(user_id=u.id, sub=sub, exiler_id=v.id)
g.db.add(exile)

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% if v.agendaposter %}
<style>
html {

View File

@ -7,7 +7,10 @@
<script src="/static/assets/js/bootstrap.js?v=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172">
{% if SITE_NAME == 'Drama' and not request.path.startswith('/s/') %}
<link rel="stylesheet" href="/static/assets/css/ukraine.css?v=1">
{% endif %}
<link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% if v.agendaposter %}
<style>
@ -32,7 +35,11 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172">
{% if SITE_NAME == 'Drama' and not request.path.startswith('/s/') %}
<link rel="stylesheet" href="/static/assets/css/ukraine.css?v=1">
{% endif %}
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
{% endif %}
{% if sub and sub.css and not request.path.endswith('settings') %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
</head>

View File

@ -34,7 +34,7 @@
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% if v.agendaposter %}
<style>
html {

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
{% endif %}
</head>

View File

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
</head>

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172"><link rel="stylesheet" href="/static/assets/css/{{v.theme}}.css?v=27">
{% if v.agendaposter %}
<style>
html {
@ -50,7 +50,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/static/assets/css/main.css?v=171">
<link rel="stylesheet" href="/static/assets/css/main.css?v=172">
<link rel="stylesheet" href="/static/assets/css/{{config('DEFAULT_THEME')}}.css?v=27">
{% endif %}
{% endblock %}