core&ui: add PREM_VIEW_DISPLAYNAME (#410)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
pandaandundefined authored and GitHub committed 2022-08-20 17:23:15 +08:00
1 parent b9bc504917
commit 7ebbaacb2a
9 files changed
+40 -18

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.39.6",
"version": "4.39.7",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -5,7 +5,7 @@
<img class="small user-profile-avatar v-center" loading="lazy" src="{{ avatarUrl(udoc.avatar|default('')) }}" width="20" height="20">
{% endif %}
<a class="user-profile-name" href="{{ url('user_detail', uid=udoc._id) }}">
{% if udoc.displayName and udoc.displayName != udoc.uname %}
{% if handler.user.hasPerm(perm.PREM_VIEW_DISPLAYNAME) and udoc.displayName and udoc.displayName != udoc.uname %}
{{ udoc.displayName }} ({{ udoc.uname }})
{% else %}
{{ udoc.uname }}
@@ -24,7 +24,7 @@
</td>
<td class="col--submit-by">
<a href="{{ url('user_detail', uid=rdoc.uid) }}">
{% if udoc.displayName %}
{% if handler.user.hasPerm(perm.PREM_VIEW_DISPLAYNAME) and udoc.displayName %}
{{ udoc.displayName }} ({{ udoc.uname }})
{% else %}
{{ udoc.uname }}