Firebase set roles to users
firebase, firebase-realtime-database, firebase-security
Solution
I found a solution... no ideia if is the best one... however, solve my problem. In any case, is a little painful to write the conditions.
and then in your firebase rules:
CUD means Create Update Delete. You can use chmod numbers as well (777, 765, etc).
Now, I need to discover how to write the conditions for -ud, --d, etc. :)
Problem
I have a situation in Firebase where users have roles. According some profile already defined in another "schema" users can delete, update, create, delete and update, etc, etc... Many combinations are made. Ex.: ``` Users/: user_1: create: "ok" delete: "no" update: "ok" user_2: create: "no" ... etc ... ``` How manage this in firebase once ".write' permission do not accept dynamic condition? I found Bolt that have some alias (create(), update(), delete()) to that however, you have only create OR update OR delete. Once one is defined you cannot change. Thanks