Back to problems

Role Privilege System

Algorithm · Snowflake · Medium

We are modeling an access‑control system where every role can be granted a set of explicitly allowed privileges and a set of explicitly disallowed privileges. Additionally, a role may inherit from other roles according to a directed acyclic graph (DAG). The final effective privileges of a role are computed by starting with all privileges inherited from its ancestors and its own explicitly allowed privileges, then removing any privilege that is explicitly disallowed anywhere…

Checking your access…