diff --git a/internal/fdw/Architecture.md b/internal/fdw/Architecture.md index 1a2c6db68..0589eec86 100644 --- a/internal/fdw/Architecture.md +++ b/internal/fdw/Architecture.md @@ -254,8 +254,7 @@ The permissions table supports three distinct query patterns, each mapping to a ```sql SELECT resource_id FROM permissions WHERE resource_type = 'doc' AND permission = 'view' - AND subject_type = 'user' AND subject_id = 'alice' - AND has_permission = true; + AND subject_type = 'user' AND subject_id = 'alice'; ``` → Calls `LookupResources(user:alice, view, doc)` @@ -264,8 +263,7 @@ The permissions table supports three distinct query patterns, each mapping to a SELECT subject_id FROM permissions WHERE resource_type = 'doc' AND resource_id = '1' AND permission = 'view' - AND subject_type = 'user' - AND has_permission = true; + AND subject_type = 'user'; ``` → Calls `LookupSubjects(doc:1, view, user)` @@ -655,8 +653,7 @@ WHERE ... AND consistency = 'fully_consistent'; DECLARE c CURSOR FOR SELECT resource_id FROM permissions WHERE resource_type = 'doc' AND permission = 'view' - AND subject_type = 'user' AND subject_id = 'alice' - AND has_permission = true; + AND subject_type = 'user' AND subject_id = 'alice'; 2. FDW Proxy: ┌──────────────────────────────────┐ diff --git a/internal/fdw/README.md b/internal/fdw/README.md index af2465bff..87e959da9 100644 --- a/internal/fdw/README.md +++ b/internal/fdw/README.md @@ -113,7 +113,7 @@ WHERE resource_type = 'document' AND permission = 'view' AND subject_type = 'user' AND subject_id = 'alice' - AND has_permission = true; + AND has_permission IS true; ``` #### Lookup Subjects @@ -126,7 +126,7 @@ WHERE resource_type = 'document' AND resource_id = 'readme' AND permission = 'view' AND subject_type = 'user' - AND has_permission = true; + AND has_permission IS true; ``` #### Query Relationships