forked from rDrama/rDrama
1
0
Fork 0

add perms for things we don't really know what they are

master
justcool393 2022-10-06 00:32:05 -07:00
parent f5be49c336
commit 767093d060
5 changed files with 13 additions and 7 deletions

View File

@ -187,6 +187,12 @@ PERMS = { # Minimum admin_level to perform action.
'MESSAGE_BLOCKED_USERS': 1, 'MESSAGE_BLOCKED_USERS': 1,
'APPS_MODERATE': 3, 'APPS_MODERATE': 3,
'STREAMERS_MODERATION': 2, '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 = { FEATURES = {

View File

@ -315,7 +315,7 @@
</a> </a>
</li> </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"> <li id="voting-{{c.id}}-mobile" class="voting list-inline-item d-md-none">
{% if voted==1 %} {% if voted==1 %}
<span class="mr-2 arrow-up comment-{{c.id}}-up active"></span> <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> <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 %} {% if voted==1 %}
<button class="btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active"></button> <button class="btn caction py-0 m-0 px-3 nobackground arrow-up mx-0 comment-{{c.id}}-up active"></button>
{% endif %} {% 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> <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> </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 %} {% if voted==-1 %}
<li class=" arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active"></li> <li class=" arrow-down py-0 m-0 px-3 comment-{{c.id}}-down active"></li>
{% endif %} {% endif %}

View File

@ -53,7 +53,7 @@
{% block subNav %} {% 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/') %} {% 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="container-fluid bg-white sticky d-none d-md-block" style="padding-top: 50px; padding-bottom: 0 !important;">
<div class="row box-shadow-bottom"> <div class="row box-shadow-bottom">

View File

@ -902,7 +902,7 @@
<span class="text-info d-none {{p.id}}-new-comments"></span> <span class="text-info d-none {{p.id}}-new-comments"></span>
</a> </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}}"> <a class="ml-2" role="button" data-bs-toggle="modal" data-bs-target="#adminModal-{{p.id}}">
<i class="fas fa-broom"></i> <i class="fas fa-broom"></i>
</a> </a>

View File

@ -48,7 +48,7 @@
{% if not postembed %} {% if not postembed %}
<div class="voting my-2 d-none d-md-flex pr-2"> <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> <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> <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> </li>
{% endif %} {% endif %}
{% if not postembed %} {% 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"> <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> <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>