feat: add scoped tenant api keys

This commit is contained in:
wizardchen
2026-07-05 10:25:37 +08:00
committed by lyingbug
parent 1708d6895a
commit 505bc7ddec
49 changed files with 2899 additions and 1578 deletions
+2 -3
View File
@@ -59,7 +59,7 @@ export const useAuthStore = defineStore('auth', () => {
})
const hasValidTenant = computed(() => {
return !!tenant.value && !!tenant.value.api_key
return !!tenant.value && !!tenant.value.id
})
const currentTenantId = computed(() => {
@@ -342,7 +342,6 @@ export const useAuthStore = defineStore('auth', () => {
setTenant({
id: String(tenantSnapshot.id) || '',
name: tenantSnapshot.name || '',
api_key: tenantSnapshot.api_key || '',
owner_id: tenantSnapshot.owner_id || u.id || '',
description: tenantSnapshot.description,
status: tenantSnapshot.status,
@@ -545,4 +544,4 @@ export const useAuthStore = defineStore('auth', () => {
logout,
initFromStorage
}
})
})