dev-plusplus / coding-docs

4 stars 2 forks source link

8base role system vs custom 8base role system #43

Closed jesusrodrz closed 2 years ago

jesusrodrz commented 3 years ago

I suggest that using the 8base role system is more easy an scalable way of managing roles for 8base applications

the current approach uses triggers to manage the the creation or update for the records that are role restricted. but this create the following problems

  1. We lose the ability to use the 8base data management to update or create data because the the user of 8base console doesn't have a custom role system and get the following error image
  2. We lose performance in the mutations that are restricted because we need to fetch the user data in the triggers to check the permissions image
  3. This way is not scalable, every time the table schema change we need to update the triggers to add the permissions for those new tables.

Using the 8base role system we don't have those problems, and its more simple way to handle this situations

https://www.loom.com/share/a906141b4bf344cd8c5c24e1065ebe45 https://www.loom.com/share/232516a6dafb4792a2f3d658c267bf10 https://www.loom.com/share/01af30c1cdcf43d2a452eeeebd026ace