add perms for things we don't really know what they are
parent
f5be49c336
commit
767093d060
|
@ -187,6 +187,12 @@ PERMS = { # Minimum admin_level to perform action.
|
|||
'MESSAGE_BLOCKED_USERS': 1,
|
||||
'APPS_MODERATE': 3,
|
||||
'STREAMERS_MODERATION': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM1': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM2': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM3': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM4': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM5': 2,
|
||||
'UNKNOWN_ADMIN_LEVEL2_PERM6': 2,
|
||||
}
|
||||
|
||||
FEATURES = {
|
||||
|
|
|
@ -315,7 +315,7 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM1'] %}
|
||||
<li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||
{% if voted==1 %}
|
||||
<span class="mr-2 arrow-up comment-{{c.id}}-up active"></span>
|
||||
|
@ -366,7 +366,7 @@
|
|||
|
||||
|
||||
<ul class="d-none d-md-flex list-inline text-right text-md-left"><li>
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < 2%}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM2'] %}
|
||||
{% if voted==1 %}
|
||||
<button class="btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active"></button>
|
||||
{% endif %}
|
||||
|
@ -383,7 +383,7 @@
|
|||
<span data-bs-toggle="tooltip" data-bs-placement="top" title="+{{ups}} | -{{downs}}" class="comment-score-{{c.id}} score comment-score-{{c.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if c.controversial %} controversial{% endif %}">{{score}}</span>
|
||||
</button>
|
||||
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM3'] %}
|
||||
{% if voted==-1 %}
|
||||
<li class=" arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active"></li>
|
||||
{% endif %}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
{% block subNav %}
|
||||
|
||||
{% set mod = (v and v.admin_level > 1) %}
|
||||
{% set mod = (v and v.admin_level >= PERMS['UNKNOWN_ADMIN_LEVEL2_PERM4']) %}
|
||||
{% if not request.path.startswith('/h/') %}
|
||||
<div class="container-fluid bg-white sticky d-none d-md-block" style="padding-top: 50px; padding-bottom: 0 !important;">
|
||||
<div class="row box-shadow-bottom">
|
||||
|
|
|
@ -902,7 +902,7 @@
|
|||
<span class="text-info d-none {{p.id}}-new-comments"></span>
|
||||
</a>
|
||||
|
||||
{% if v and v.admin_level > 1 %}
|
||||
{% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %}
|
||||
<a class="ml-2" role="button" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
|
||||
<i class="fas fa-broom"></i>
|
||||
</a>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
{% if not postembed %}
|
||||
<div class="voting my-2 d-none d-md-flex pr-2">
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM5'] %}
|
||||
<div tabindex="0" role="button" onclick="vote('post', '{{p.id}}', '1')" class="post-{{p.id}}-up mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></div>
|
||||
|
||||
<span class="post-score-{{p.id}} score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}{% if p.controversial %} controversial{% endif %}"{% if not p.is_banned %} data-bs-toggle="tooltip" data-bs-placement="right" title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
|
||||
|
@ -245,7 +245,7 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
{% if not postembed %}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < 2 %}
|
||||
{% if v and request.path.startswith('/@') and v.admin_level < PERMS['UNKNOWN_ADMIN_LEVEL2_PERM6'] %}
|
||||
<li id="voting-{{p.id}}-mobile" class="voting list-inline-item d-md-none">
|
||||
|
||||
<span tabindex="0" role="button" onclick="vote('post-mobile', '{{p.id}}', '1')" class="post-mobile-{{p.id}}-up mx-0 pr-1 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% else %}d-none{% endif %}"></span>
|
||||
|
|
Loading…
Reference in New Issue