update default limit of apikey number per user to one and disallow key deletion by default

This commit is contained in:
Feng Yue
2025-09-02 21:42:48 +08:00
parent d56da4d799
commit 3860f7d9b3
5 changed files with 30 additions and 7 deletions

View File

@@ -534,9 +534,15 @@ class UserService {
// 构建匹配字符串数组只考虑displayName、username、email去除空值和重复值
const matchStrings = new Set()
if (displayName) matchStrings.add(displayName.toLowerCase().trim())
if (username) matchStrings.add(username.toLowerCase().trim())
if (email) matchStrings.add(email.toLowerCase().trim())
if (displayName) {
matchStrings.add(displayName.toLowerCase().trim())
}
if (username) {
matchStrings.add(username.toLowerCase().trim())
}
if (email) {
matchStrings.add(email.toLowerCase().trim())
}
const matchingKeys = []