Creates an Attribute-Based Access Control policy. Grants access based on attributes of the subject, resource, action, and context.
Subject type
Resource type
Action type
Context type
Function that evaluates attributes and returns true if access should be granted
An ABAC policy
const abacPolicy = buildAbacPolicy<User, Document, string, Context>( ({subject, resource}) => resource.isPublic || subject.id === resource.ownerId); Copy
const abacPolicy = buildAbacPolicy<User, Document, string, Context>( ({subject, resource}) => resource.isPublic || subject.id === resource.ownerId);
Creates an Attribute-Based Access Control policy. Grants access based on attributes of the subject, resource, action, and context.