feat: LDAP 用户隐藏密码修改功能并应用默认配额

- /me API 返回 auth_source 字段
- 前端 Settings 页面对 LDAP 用户隐藏密码修改卡片
- LDAP 用户首次登录创建时使用系统默认配额

Close #98
This commit is contained in:
fawney19
2026-01-15 17:57:58 +08:00
parent d9645fa062
commit dd387735d4
4 changed files with 13 additions and 3 deletions

View File

@@ -11,8 +11,9 @@ export interface Profile {
used_usd: number
total_usd?: number // 累积消费总额
created_at: string
updated_at: string
updated_at?: string
last_login_at?: string
auth_source?: 'local' | 'ldap'
preferences?: UserPreferences
}

View File

@@ -69,8 +69,11 @@
</form>
</Card>
<!-- 修改密码 -->
<Card class="p-6">
<!-- 修改密码 (LDAP 用户不显示) -->
<Card
v-if="profile?.auth_source !== 'ldap'"
class="p-6"
>
<h3 class="text-lg font-medium text-foreground mb-4">
修改密码
</h3>