feat(auth): password change (self + admin reset) with rate limiting; dedupe watchlist to user menu
Build & Push Docker Image / build (push) Successful in 2m19s

This commit is contained in:
opencode
2026-08-03 07:43:24 +02:00
parent 63f0bdbab6
commit 68a81ec775
20 changed files with 825 additions and 16 deletions
@@ -52,6 +52,14 @@ export const UserTier = {
enterprise: 'enterprise',
} as const;
export type UserAuthProvider = typeof UserAuthProvider[keyof typeof UserAuthProvider];
export const UserAuthProvider = {
local: 'local',
oidc: 'oidc',
} as const;
export interface User {
id: number;
username: string;
@@ -59,6 +67,7 @@ export interface User {
email?: string | null;
role: UserRole;
tier?: UserTier;
authProvider?: UserAuthProvider;
createdAt: string;
}
@@ -111,6 +120,23 @@ export interface UserRoleUpdate {
tier?: UserRoleUpdateTier;
}
export interface ChangePasswordInput {
/** @minLength 1 */
currentPassword: string;
/** @minLength 8 */
newPassword: string;
}
export interface SetPasswordInput {
/** @minLength 8 */
password: string;
}
export interface PasswordRedirect {
/** @nullable */
url: string | null;
}
export interface AuditLog {
id: number;
entityType: string;