cycleplanet / cycle-planet

Official Cycle Planet repo, an open source and non-profit network of long distance cyclers and those who want to host them.
https://cycleplanet.org/
MIT License
10 stars 4 forks source link

Only disclose personal data to other users as needed #31

Open reinierl opened 2 years ago

reinierl commented 2 years ago

As a non-hosting user, I don't want to expose details about my location to other users because that can be used maliciously and is not needed for any functionality of the app I'm using.

Currently we store all data we have about a user under a single path in Firebase RTDB: /Users/<id>. Some functionalities read the /Users or /Users/<id> path to aggregate user data so we can't set granular permissions within there because of the way Firebase RTDB security rules work. The result is that all user data can be read by anyone who has access to any user data. That is everyone on the web as long as #30 isn't fixed and all logged-in users after that.

To be more precise in what is and isn't allowed, I propose the following:

We'll probably want to store the Profiles in Cloud Firestore instead of Real-Time Database because we're already using Cloud Firestore for the markers and it seems a better fit for our app in the long run.

Progress

As currently ongoing on branch feature/user-profiles: