Skip to content

Commit

Permalink
Update nested collection access of invitations
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljohanneskraft committed Nov 4, 2024
1 parent 2dcd268 commit 7d748d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ service cloud.firestore {
match /invitations/{invitationId}/{collectionName}/{documentId} {
function isOwnerOrClinicianOfSameOrganization() {
let invitation = getInvitation(invitationId);
return isOwnerOrClinicianOf(invitation.user.organization);
return invitation != null && isOwnerOrClinicianOf(invitation.data.user.organization);
}

function isPatientWritableCollectionName() {
Expand Down

0 comments on commit 7d748d5

Please sign in to comment.