Add /private-users/apiKey to DB

This commit is contained in:
Marshall Polaris 2022-05-11 00:12:54 -07:00
parent 19da0c6c82
commit c6e5fe1c3c
2 changed files with 4 additions and 0 deletions

View File

@ -35,4 +35,5 @@ export type PrivateUser = {
unsubscribedFromGenericEmails?: boolean
initialDeviceToken?: string
initialIpAddress?: string
apiKey?: string
}

View File

@ -21,6 +21,9 @@ service cloud.firestore {
match /private-users/{userId} {
allow read: if resource.data.id == request.auth.uid || isAdmin();
allow update: if (resource.data.id == request.auth.uid || isAdmin())
&& request.resource.data.diff(resource.data).affectedKeys()
.hasOnly(['apiKey']);
}
match /private-users/{userId}/views/{viewId} {