Home / Companies / Hasura / Blog / Post Details
Content Deep Dive

Implementing a Google Drive Style Hierarchical Authorization System in Hasura

Blog post from Hasura

Post Details
Company
Date Published
Author
Gavin Ray
Word Count
1,014
Company Posts That Month
10
Language
English
Hacker News Points
-
Post removed?
No
Summary

Implementing a hierarchical authorization system similar to Google Drive within Hasura involves utilizing a role and permissions model that supports both hierarchical roles and dynamic access controls. The system is designed for complex scenarios where users, organized into teams, work on projects with assigned folder access, allowing permissions to be inherited through a parent-child relationship unless overridden by specific rules. A database schema featuring tables for users, folders, teams, and permissions is employed to structure the data, with SQL views dynamically generating a flattened view of the folder-user-access level relationships to accommodate unknown relationship depths. Hasura's permission clauses are then configured using JSON structures to allow or restrict user actions based on their access type and user ID, effectively managing hierarchical and individual folder access permissions.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 897 308 107 -10%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.