From 9ebd8e7a8091d2d72a98632abd957535c004f39d Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 28 May 2026 22:08:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(index.ui):=20=E5=AE=A2=E6=88=B7=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E7=94=A8customer.*=E8=A7=92=E8=89=B2=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - customer.*角色: 看到真人认证、上传素材(2张) - owner.superuser/reseller.operator: 看到全部6张 - 无角色/未登录: 不显示任何卡片 --- wwwroot/index.ui | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index a8655a4..bda5fd3 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,4 +1,6 @@ {% set roles = get_user_roles(get_user()) %} +{% set role_str = roles|join(',') %} +{% set is_customer = 'customer.' in role_str %} {% set is_admin = 'owner.superuser' in roles or 'reseller.operator' in roles %} { "widgettype": "VBox", @@ -24,6 +26,7 @@ "minWidth": "280px" }, "subwidgets": [ +{% if is_customer or is_admin %} { "widgettype": "Button", "options": { @@ -104,6 +107,7 @@ } ] } +{% endif %} {% if is_admin %} ,{ "widgettype": "Button",