feat: add scoped tenant api keys
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user