fix profile detail permissions
This commit is contained in:
parent
b3fac428e9
commit
948a06df4e
1 changed files with 67 additions and 64 deletions
|
@ -5,6 +5,7 @@
|
||||||
{% set title = profileHidden ? 'User not found!' : 'Profile of ' ~ profile.username %}
|
{% set title = profileHidden ? 'User not found!' : 'Profile of ' ~ profile.username %}
|
||||||
{% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %}
|
{% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %}
|
||||||
|
|
||||||
|
{% if user.perms.viewUserLinks or user.perms.viewUserDetails %}
|
||||||
{% set fields = {
|
{% set fields = {
|
||||||
"website": {
|
"website": {
|
||||||
"title": "Website",
|
"title": "Website",
|
||||||
|
@ -66,6 +67,7 @@
|
||||||
"value": user.perms.viewUserDetails ? profile.lastIp : null,
|
"value": user.perms.viewUserDetails ? profile.lastIp : null,
|
||||||
},
|
},
|
||||||
} %}
|
} %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
{% if not profileHidden %}
|
{% if not profileHidden %}
|
||||||
|
@ -300,8 +302,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<hr>
|
<hr>
|
||||||
{% if user.isActive %}
|
{% if user.perms.viewUserLinks or user.perms.viewUserDetails %}
|
||||||
{# if user.perms.viewUserLinks or user.perms.viewUserDetails #}
|
|
||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
{% for id, data in fields %}
|
{% for id, data in fields %}
|
||||||
{% if data.value != null %}
|
{% if data.value != null %}
|
||||||
|
@ -320,8 +321,10 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
{% elseif user.id == 0 %}
|
||||||
|
<div><b>Log in to view the full profile!</b></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<b>Log in to view the full profile!</b>
|
<div><b>You aren't allowed to view profile details!</b></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<b>Account Standing</b>
|
<b>Account Standing</b>
|
||||||
{% if not profile.activated %}
|
{% if not profile.activated %}
|
||||||
|
|
Reference in a new issue