fix: hide '我的今日模型使用' card for non-customer roles
Remove duplicate unprotected card that was always rendered regardless
of role, causing 403 for non-customer users. Keep only the customer-
only version wrapped in {% if 'customer.*' in roles %}.
This commit is contained in:
parent
66f588cd80
commit
8bed983919
@ -436,65 +436,6 @@
|
||||
]
|
||||
}
|
||||
{% endif %}
|
||||
,{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "100%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"marginTop": "20px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"alignItems": "center",
|
||||
"marginBottom": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"fontWeight": "600",
|
||||
"otext": "我的今日模型使用",
|
||||
"i18n": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Filler"
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"options": {
|
||||
"label": "刷新",
|
||||
"border": "none",
|
||||
"borderRadius": "6px",
|
||||
"padding": "4px 12px",
|
||||
"fontSize": "12px"
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "method",
|
||||
"target": "-@ChartBar",
|
||||
"method": "render_urldata",
|
||||
"params": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "urlwidget",
|
||||
"options": {
|
||||
"url": "{{entire_url('user_today_models_chart.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{% if 'customer.*' in roles %}
|
||||
,{
|
||||
"widgettype": "VBox",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user