phase1: RLS simplified to tenant isolation only + canAccess fallback removed + useUserPermissions hook + security kernel docs

This commit is contained in:
Agent Zero
2026-07-29 16:36:51 +02:00
parent 66fd387301
commit 8da803156e
9 changed files with 222 additions and 16 deletions
+4
View File
@@ -1,11 +1,15 @@
import { useEffect } from 'react';
import { useAuthStore } from '@/store/authStore';
import { useCurrentUser } from '@/api/hooks';
import { useUserPermissions } from '@/hooks/useUserPermissions';
export function useAuth() {
const store = useAuthStore();
const { data, isLoading, isError, error } = useCurrentUser();
// Load permissions after authentication
useUserPermissions();
useEffect(() => {
if (isError) {
const status = (error as any)?.status || 0;