codeforbtv / baby-equipment-exchange

MIT License
0 stars 8 forks source link

Treat all users as “users” / “donors”, then track whether people are also admins or mutual aid workers in separate tables #31

Closed ksnielsen closed 10 months ago

NathanWEdwards commented 10 months ago

Users should be able to be associated as users/donors, admins, and aides.

Acceptance criteria:

Pull Request 22 introduces support for custom claims. Custom Claims is a feature the Firebase SDK offers that assigns attributes to users. These assigned attributes are not visible without programmatic access. Additionally, custom claims are compatible with Firebase Security Rules.

When a new user is created, a 'donor' claim is assigned to a user.

As of pull request 42, users can also be granted an admin and aid-worker claim. And, in pull request 43, users can be assigned to any supported claim via a dashboard that is visible to users with an admin claim.

As of now, a user must have a donor claim present evaluating to true in order to create a new donation.