File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ service cloud.firestore {
1717 match /testing/{studyID} {
1818 allow create: if isAuthenticated() && !exists(/databases/$(database)/documents/testing/$(studyID));
1919 allow read: if isAuthenticated(); // Add this line
20+ allow update: if isAuthenticated() &&
21+ request.resource.data.diff(resource.data).affectedKeys().hasOnly(['lastUpdated']);
2022 match /data/{partID} {
2123 allow create: if isAuthenticated() &&
2224 request.resource.data.firebaseAnonAuthID == request.auth.uid;
@@ -36,6 +38,8 @@ service cloud.firestore {
3638 match /real/{studyID} {
3739 allow create: if isAuthenticated() && !exists(/databases/$(database)/documents/real/$(studyID));
3840 allow read: if isAuthenticated(); // Add this line
41+ allow update: if isAuthenticated() &&
42+ request.resource.data.diff(resource.data).affectedKeys().hasOnly(['lastUpdated']);
3943 match /data/{partID} {
4044 allow create: if isAuthenticated() &&
4145 request.resource.data.firebaseAnonAuthID == request.auth.uid;
You can’t perform that action at this time.
0 commit comments