优化
This commit is contained in:
@@ -3382,6 +3382,8 @@ async function softApiStep(module, name, request, validate, evidenceBuilder = de
|
||||
}
|
||||
|
||||
async function httpRequest({ method = 'GET', path, token, headers = {}, body, responseType = 'json' }) {
|
||||
if (String(method).toUpperCase() === 'POST' && /^\/api\/(platform|merchant)\/v1\/iam\/(roles|users|members|permissions)$/.test(new URL(path, 'https://acceptance.invalid').pathname.replace(/\/$/, '')))
|
||||
throw new Error('固定资源验收禁止新增角色、账号或权限,请复用已配置身份')
|
||||
if (String(method).toUpperCase() === 'POST'
|
||||
&& ['/api/auth/register', '/api/platform/v1/iam/tenants'].includes(new URL(path, 'https://acceptance.invalid').pathname.replace(/\/$/, ''))) {
|
||||
throw new Error('固定客户模式禁止注册或创建客户')
|
||||
|
||||
Reference in New Issue
Block a user