06: Firestorm Auth and Working with QR Codes and Views - team-photo-app/photo-app GitHub Wiki

Data Store Security Filter

// Anyone to read a public image if the file is less than 100kB
// Anyone can upload a public file ending in '.txt'
match /public/{imageId} {
  allow read: if resource.size < 100 * 1024;
  allow write: if imageId.matches(".*\\.txt");
}
match /public/{eventUUID}/{imageId}
allow read: if eventUUID in "auth props or something"
allow write: if eventUUID in "auth props or something"
  • View Security Filter
    • "Event Data UUID in Auth Props"

Firestore Security Filter

This is Written in the database rules tab

Auth Admin Props

  • Need events to be stored in a list.
admin.auth().setCustomUserClaims(uid, {admin: true}).then(() => {
  // The new custom claims will propagate to the user's ID token the
  // next time a new one is issued.
});

instead of admin true obj

{
events: lists,
}

Firebase Functions

  • Need a seperate role privledge for backend user.

Useful Links