https://authzed.com logo
Title
j

jan.

04/26/2023, 1:09 PM
Hi guys. I apologize if this is not the right place to ask this, but I figured you could probably point me in the right direction. I am working on implementing a permission system in our service and am looking at authzed to do it. I think I have understood the basic concepts but there's one I currently don't see how it would be done. As an example lets say we have only two entities, user and document. Now obviously a document can be owned by a user but wether or not they can publish it, depends on wether or not they have paid for it. From what I understand I would now add a relation ('paid: user') which I would update whenever the paid state for a document changes. (correct?). Now what if there is another arbitrary property on 'events', let's say "length". If the length is less or equal than 100, any user can publish without paying for it. If it has more they'll have to purchase it first. How would I model/implement this?