sneed
This commit is contained in:
parent
3c29aaa7b1
commit
935704d410
3 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue