← Graph

granity

tool 6 connections

Ruby gem created by Yatish Mehta to support Fine-Grained Authorization in Rails apps. On install it adds a migration and model to store tuples. Users define an authorization schema in an initializer: declare resource types (user, team, project, task, …), declare relationships between them (member, admin, editor, creator, …), and then define permissions using an include_any / include_all DSL that composes relationships and other permissions. The schema is compiled to a graph object that can be queried for dependencies. Application code creates/updates/removes tuples alongside domain changes (e.g. when a user becomes an editor of a project). Permission checks (check_permission / helper methods) walk the graph by id, returning true/false and optionally the path that granted or denied access. Features smart caching with dependency-aware invalidation and reverse lookups (caveat: no pagination yet).

license
open-source
category
library
language
Ruby
about
granity tool
Introduces and demos Yatish's granity gem.
Recommends adopting granity for FGA needs.
about
granity tool
Applies directly to granity users.
about
granity tool
Answered in the context of granity's schema.
tool granity
related_to
granity implements FGA/ReBAC for Rails.
person Yatish Mehta
works_on
granity tool
Author/creator of the granity gem for FGA in Rails.
role: author

Provenance

Read by
3 extractions