our father
parent
c0a3ae69de
commit
40dc1439f3
|
@ -32,7 +32,7 @@ def truescore(v):
|
|||
@limiter.limit("1/second")
|
||||
@admin_level_required(6)
|
||||
def revert_actions(v, username):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
|
||||
|
@ -118,7 +118,7 @@ def club_ban(v, username):
|
|||
@limiter.limit("1/second")
|
||||
@admin_level_required(6)
|
||||
def make_admin(v, username):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
user.admin_level = 6
|
||||
|
@ -131,7 +131,7 @@ def make_admin(v, username):
|
|||
@limiter.limit("1/second")
|
||||
@admin_level_required(6)
|
||||
def remove_admin(v, username):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
user.admin_level = 0
|
||||
|
@ -144,7 +144,7 @@ def remove_admin(v, username):
|
|||
@limiter.limit("1/second")
|
||||
@admin_level_required(6)
|
||||
def make_fake_admin(v, username):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
user.admin_level = 1
|
||||
|
@ -157,7 +157,7 @@ def make_fake_admin(v, username):
|
|||
@limiter.limit("1/second")
|
||||
@admin_level_required(6)
|
||||
def remove_fake_admin(v, username):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
user = get_user(username)
|
||||
if not user: abort(404)
|
||||
user.admin_level = 0
|
||||
|
@ -170,7 +170,7 @@ def remove_fake_admin(v, username):
|
|||
@limiter.limit("1/day")
|
||||
@admin_level_required(6)
|
||||
def monthly(v):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.id in [1,28,995,2513]) or ('rama' not in request.host and 'pcm' not in request.host):
|
||||
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
|
||||
for u in g.db.query(User).options(lazyload('*')).filter(User.patron > 0).all():
|
||||
if u.patron == 1: procoins = 2000
|
||||
|
|
|
@ -719,7 +719,7 @@ def award_comment(cid, v):
|
|||
@admin_level_required(6)
|
||||
def admin_userawards_get(v):
|
||||
|
||||
if request.host == 'rdrama.net' and v.id not in [1,28,995]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
|
||||
if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
|
||||
return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v)
|
||||
|
||||
@app.post("/admin/awards")
|
||||
|
@ -766,7 +766,7 @@ def admin_userawards_post(v):
|
|||
|
||||
g.db.commit()
|
||||
|
||||
if request.host == 'rdrama.net' and v.id not in [1,28,995]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
|
||||
if request.host == 'rdrama.net' and v.id not in [1,28,995,2513]: render_template("admin/awards.html", awards=list(AWARDS2.values()), v=v)
|
||||
return render_template("admin/awards.html", awards=list(AWARDS.values()), v=v)
|
||||
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
</form>
|
||||
|
||||
<pre></pre>
|
||||
{% if 'rdrama.net' not in request.host or v.id in [1,995] %}
|
||||
{% if 'rdrama.net' not in request.host or v.id in [1,995,2513] %}
|
||||
<div><a class="btn btn-success" href="javascript:void(0)" onclick="post_toast('/admin/monthly')">Grant Monthly Marseybux</a></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -209,7 +209,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'rama' in request.host and v.id in [1,28,995] %}
|
||||
{% if 'rama' in request.host and v.id in [1,28,995,2513] %}
|
||||
<a id="admin" class="{% if u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin','unadmin')">Make admin</a>
|
||||
<a id="unadmin" class="{% if not u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin','unadmin')">Remove admin</a>
|
||||
|
||||
|
@ -491,7 +491,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'rama' in request.host and v.id in [1,28,995] %}
|
||||
{% if 'rama' in request.host and v.id in [1,28,995,2513] %}
|
||||
<a id="admin2" class="{% if u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/make_admin','admin2','unadmin2')">Make admin</a>
|
||||
<a id="unadmin2" class="{% if not u.admin_level %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2('/@{{u.username}}/remove_admin','admin2','unadmin2')">Remove admin</a>
|
||||
|
||||
|
|
Loading…
Reference in New Issue