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
@@ -163,9 +163,6 @@ export function ContactDetail({ contact, loading, onEdit, onDeleted }: ContactDe
const { hasPermission, hasFieldAccess } = usePermission();
const authUser = useAuthStore((state) => state.user);
const canAccess = (perm: string): boolean => {
if (authUser?.is_system_admin) return true;
const perms = authUser?.permissions || [];
if (perms.length === 0) return true;
return hasPermission(perm);
};
const createPersonMutation = useCreateContactPerson();