remotes/1693045480750635534/spooky-22
fireworks88 2021-07-29 00:11:18 +02:00
parent 63e5a338f3
commit a2b826cd22
3 changed files with 4 additions and 4 deletions

View File

@ -633,7 +633,7 @@ def ban_user(user_id, v):
user = g.db.query(User).filter_by(id=user_id).first()
if user.admin_level != 0: abort(403)
if user.admin_level >= v.admin_level: abort(403)
# check for number of days for suspension
days = int(request.form.get("days")) if request.form.get('days') else 0
@ -642,7 +642,7 @@ def ban_user(user_id, v):
if not user: abort(400)
if user.admin_level > 0: abort(403)
#if user.admin_level > 0: abort(403)
if days > 0:
if message:

View File

@ -920,7 +920,7 @@ def toggle_comment_pin(cid, v):
comment = get_comment(cid, v=v)
if v.admin_level != 6 and v.id != comment.post.author_id:
if v.admin_level < 1 and v.id != comment.post.author_id:
abort(403)
comment.is_pinned = not comment.is_pinned

View File

@ -336,7 +336,7 @@
{% endif %}
{% endif %}
{% if v and c.post and (v.admin_level == 6 or v.id == c.post.author_id) %}
{% if v and c.post and (v.admin_level >= 1 or v.id == c.post.author_id) %}
<div class="dropdown-divider"></div>
{% if c.level == 1 %}
<a class="dropdown-item text-info" id="pin-comment-{{c.base36id}}" href="javascript:void(0)" data-dismiss="modal" data-target="#actionsModal-{{c.base36id}}" onclick="post('/comment_pin/{{c.base36id}}', function(){window.location.reload(true);})"><i class="fas fa-thumbtack fa-rotate--45 fa-fw text-info"></i>{{"Unpin" if c.is_pinned else "Pin"}}</a>