Title: feat(permissions): Implement hierarchical ACL checking engine with Redis caching layer · Issue #28 · docsgraph/docsgraph-server · GitHub
Open Graph Title: feat(permissions): Implement hierarchical ACL checking engine with Redis caching layer · Issue #28 · docsgraph/docsgraph-server
X Title: feat(permissions): Implement hierarchical ACL checking engine with Redis caching layer · Issue #28 · docsgraph/docsgraph-server
Description: Description Design and develop a hierarchical permission/ACL evaluation engine where document access rights can be inherited from parent collections (directories/folders) or groups, utilizing a Redis caching layer to bypass heavy DB join...
Open Graph Description: Description Design and develop a hierarchical permission/ACL evaluation engine where document access rights can be inherited from parent collections (directories/folders) or groups, utilizing a Red...
X Description: Description Design and develop a hierarchical permission/ACL evaluation engine where document access rights can be inherited from parent collections (directories/folders) or groups, utilizing a Red...
Opengraph URL: https://github.com/docsgraph/docsgraph-server/issues/28
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(permissions): Implement hierarchical ACL checking engine with Redis caching layer","articleBody":"Description\nDesign and develop a hierarchical permission/ACL evaluation engine where document access rights can be inherited from parent collections (directories/folders) or groups, utilizing a Redis caching layer to bypass heavy DB joins on hot paths.\n\nContext\nContracts and company documents are organized into folders. Permission grants can occur at the individual document level, the parent directory level, or the group membership level. Fetching and validating this tree structures on every API request introduces heavy performance penalties.\n\nTechnical Implementation Blueprint\nHierarchical Resolution Logic: Write a recursive database utility or common table expression (CTE) query to resolve the effective access level for a user:\nsql:\nWITH RECURSIVE folder_path AS (\n SELECT id, parent_id, id as origin_id FROM folders WHERE id = :target_folder_id\n UNION ALL\n SELECT f.id, f.parent_id, p.origin_id FROM folders f\n INNER JOIN folder_path p ON f.id = p.parent_id\n)\nSELECT permission FROM acl \nWHERE (object_id IN (SELECT id FROM folder_path) OR object_id = :document_id)\n AND (subject_id = :user_id OR subject_id IN (SELECT group_id FROM user_groups WHERE user_id = :user_id))\nORDER BY priority DESC LIMIT 1;\n\nRedis Permission Caching: Cache resolved keys in Redis: user:permissions:{tenant_id}:{user_id}:{document_id} string containing the resolved access level (READ, WRITE, ADMIN, NONE).\nInvalidation Listeners: Add SQLAlchemy event listeners on ACL and UserGroup models to invalidate relevant Redis keys when permissions are modified.\nAcceptance Criteria\n Access control correctly respects group membership and directory inheritance hierarchy.\n Permission check overhead must not exceed 5ms for cached values.\n Modifying folder permissions instantly invalidates the cache for all documents contained recursively inside it.","author":{"url":"https://github.com/priyanshuvishwakarma273403","@type":"Person","name":"priyanshuvishwakarma273403"},"datePublished":"2026-08-26T10:24:48Z","url":"https://github.com/docsgraph/docsgraph-server/issues/28"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6ee9212e-60c5-d8c0-bf5a-36eee71bfd9d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E784:D4E59:2070E3:290BC8:6B01EA8B |
| html-safe-nonce | 1e82cc08431930fe8116c9309ffe1f9757559d902929f50f35668a4c2ac16cf9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzg0OkQ0RTU5OjIwNzBFMzoyOTBCQzg6NkIwMUVBOEIiLCJ2aXNpdG9yX2lkIjoiMTI4ODkxODU0OTE1ODU1NDI1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f4df00388e82d6d1b4a9740b229bcb66791a4ab1d3dfaeb02a6f63674c9b2ec |
| hovercard-subject-tag | issue:5255957703 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docsgraph/docsgraph-server/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/66947a80eb764ac78f1f8176cc970cd17a65922c3aea09d0d56318621a959aaf/docsgraph/docsgraph-server/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/66947a80eb764ac78f1f8176cc970cd17a65922c3aea09d0d56318621a959aaf/docsgraph/docsgraph-server/issues/28 |
| og:image:alt | Description Design and develop a hierarchical permission/ACL evaluation engine where document access rights can be inherited from parent collections (directories/folders) or groups, utilizing a Red... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | priyanshuvishwakarma273403 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/docsgraph/docsgraph-server git https://github.com/docsgraph/docsgraph-server.git |
| octolytics-dimension-user_id | 307759105 |
| octolytics-dimension-user_login | docsgraph |
| octolytics-dimension-repository_id | 1309171278 |
| octolytics-dimension-repository_nwo | docsgraph/docsgraph-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1309171278 |
| octolytics-dimension-repository_network_root_nwo | docsgraph/docsgraph-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width