半自动+人工”链路已经落下第一版
This commit is contained in:
@@ -343,7 +343,17 @@ function signPayload(encodedPayload) {
|
||||
}
|
||||
|
||||
export function normalizeAdminRole(role) {
|
||||
return String(role || '').trim().toLowerCase() === 'admin' ? 'admin' : 'operator'
|
||||
const normalized = String(role || '').trim().toLowerCase()
|
||||
|
||||
if (normalized === 'admin') {
|
||||
return 'admin'
|
||||
}
|
||||
|
||||
if (normalized === 'support') {
|
||||
return 'support'
|
||||
}
|
||||
|
||||
return 'operator'
|
||||
}
|
||||
|
||||
export function normalizeAdminUserStatus(status) {
|
||||
@@ -363,7 +373,7 @@ function safeCompare(input, expected) {
|
||||
|
||||
function normalizeRoleQuery(role) {
|
||||
const normalized = String(role || '').trim().toLowerCase()
|
||||
return ['admin', 'operator'].includes(normalized) ? normalized : ''
|
||||
return ['admin', 'operator', 'support'].includes(normalized) ? normalized : ''
|
||||
}
|
||||
|
||||
function normalizeStatusQuery(status) {
|
||||
|
||||
Reference in New Issue
Block a user