remotes/1693045480750635534/spooky-22
parent
c86ebe6f47
commit
7d44f8456f
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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') %}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue