is there a way to write time-based cerbos policies...
# help
j
is there a way to write time-based cerbos policies? like manager from branch A is only allowed access to branch A data between 9am to 5pm from Mondays to Fridays, or engineer in department C can only access archive data for the next 3 hours?
d
Yes, there’re time related functions available in the policies’ conditions.
j
so lastaccessed and and lastupdatetime are just custom attributes that we pass in to the /api/check endpoint?
meaning my code has to keep track of these values and pass them in to cerbos for policy evaluation.
d
Yes, correct.
🆗 1