Guides
Create a policy
A policy defines whether a use case can be accessed/executed or not.
Intro
A policy is a class that implements the UCPolicy
interface.
libmodulor
provides policies that are commonly used.
But some apps need specific policies.
Example
As an example, you can define a policy to allow some use cases only to "Pro" users.
In this example, we get the information from a hypothetical UserDataStore
but you are free to inject anything you need in here.