Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions internal/fdw/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`

Expand All @@ -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)`

Expand Down Expand Up @@ -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:
┌──────────────────────────────────┐
Expand Down
4 changes: 2 additions & 2 deletions internal/fdw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading