登录测试台支持投顾:快捷按钮 + 只读探针
- 快捷填充加 advisor_t / abc12345; - 探针加「已发布投顾方案」(GET /api/v1/advisor/recommendations/published),按 advisor 角色启用。 实测同一接口的对照:投顾令牌 200(data: []),客户令牌 403 —— 权限边界正确。
This commit is contained in:
@@ -89,6 +89,7 @@ PAGE = """<!doctype html>
|
||||
<button onclick="fill('cust_t','123456')">客户</button>
|
||||
<button onclick="fill('risk_t','666666')">员工 / 风控</button>
|
||||
<button onclick="fill('admin_t','88888888')">管理员</button>
|
||||
<button onclick="fill('advisor_t','abc12345')">投顾</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -151,6 +152,8 @@ function renderProbes(roles, userId) {
|
||||
{ label: '角色清单', path: '/api/v1/admin/roles', role: 'admin' },
|
||||
{ label: '我的身份(管理视角)',
|
||||
path: `/api/v1/admin/users/${userId}/roles`, role: 'admin' },
|
||||
{ label: '已发布投顾方案', path: '/api/v1/advisor/recommendations/published',
|
||||
role: 'advisor' },
|
||||
];
|
||||
const box = document.getElementById('probes');
|
||||
box.innerHTML = '';
|
||||
|
||||
Reference in New Issue
Block a user