mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-08-30 02:41:34 +00:00
feat: share credentials with users and roles, inherit data on account deletion (#1342)
* feat: share credentials with users and roles, inherit data on account deletion Credentials can be shared at "use" or "manage" level. Recipients get a copy re-encrypted under their own data key (shared_credential_secrets), kept in step with the owner's row through the same lifecycle hooks as shared host secrets. One gate, findUsableCredential(), replaces the private-namespace lookups so a shared credential works wherever a private one does. Deleting a user now hands their hosts and credentials to a successor (the deleting admin by default) instead of revoking everything they shared. * fix: harden credential ownership transfer
This commit is contained in:
@@ -24,6 +24,7 @@ const api = vi.hoisted(() => ({
|
||||
createApiKey: vi.fn(async () => ({})),
|
||||
deleteApiKey: vi.fn(async () => ({})),
|
||||
deleteUser: vi.fn(async () => ({})),
|
||||
getUserList: vi.fn(async () => ({ users: [] })),
|
||||
getUserRoles: vi.fn(async () => ({ roles: [] as unknown[] })),
|
||||
assignRoleToUser: vi.fn(async () => ({})),
|
||||
removeRoleFromUser: vi.fn(async () => ({})),
|
||||
|
||||
Reference in New Issue
Block a user