meifannao
09/25/2024, 8:28 AMvroldanbet
09/25/2024, 9:23 AMmeifannao
09/25/2024, 9:34 AMvroldanbet
09/25/2024, 10:40 AMCheckPermissions
call against SpiceDB.
You also need to feed SpiceDB with the relationship data needed to compute permissions. So you need to model your schema after your business domain, and decide how you are going to feed that data.meifannao
09/25/2024, 12:24 PMvroldanbet
09/25/2024, 1:42 PMBook
type, and that type has a view
method, then you can transparently turn that into a SpiceDB CheckPermission book:my_book#view:user:current_user
. If you have something like book:all
then you can use SpiceDB LookupResources
to return all books the user has access to.
Unfortunately there is no magic spell I can give you right now to transform your application into a SpiceDB-enabled application. That's why it's always a good idea to start thinking about authorization early, as the costs of migrating explode later on with the size of the application and engineering teams involved.yetitwo
09/25/2024, 3:06 PMmeifannao
09/25/2024, 3:16 PMyetitwo
09/25/2024, 3:32 PMyetitwo
09/25/2024, 3:34 PMbraden
09/26/2024, 12:01 AMmeifannao
09/26/2024, 9:24 AM