fix(web): redesign auth and settings UI using system design tokens and high-fidelity styles
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
weichen
co-authored by
Cursor
parent
eedf2d17e0
commit
e8b9347d8d
@@ -336,6 +336,26 @@ export class AuthClient {
|
||||
return Array.from(this.users.values()).map(({ password, ...u }) => u);
|
||||
}
|
||||
|
||||
/**
|
||||
* 别名兼容:listAllUsers
|
||||
*/
|
||||
async listAllUsers(): Promise<UserAccount[]> {
|
||||
return this.getAdminUsers();
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员重置指定用户密码并标记首次登录强制改密
|
||||
*/
|
||||
async adminResetPassword(userId: number, tempPass: string): Promise<boolean> {
|
||||
const user = this.users.get(userId);
|
||||
if (!user) throw new Error('用户不存在');
|
||||
user.password = tempPass;
|
||||
user.mustChangePassword = true;
|
||||
user.updatedAt = new Date().toISOString();
|
||||
this.saveToStorage();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员手动创建新账号
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user