Skip to content

Commit

Permalink
Update access control of nested collection of invitations (#177)
Browse files Browse the repository at this point in the history
# Update access control of nested collection of invitations

## ♻️ Current situation & Problem
#176 


## ⚙️ Release Notes 
*Add a bullet point list summary of the feature and possible migration
guides if this is a breaking change so this section can be added to the
release notes.*
*Include code snippets that provide examples of the feature implemented
or links to the documentation if it appends or changes the public
interface.*


## 📚 Documentation
*Please ensure that you properly document any additions in conformance
to [Spezi Documentation
Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).*
*You can use this section to describe your solution, but we encourage
contributors to document your reasoning and changes using in-line
documentation.*


## ✅ Testing
*Please ensure that the PR meets the testing requirements set by CodeCov
and that new functionality is appropriately tested.*
*This section describes important information about the tests and why
some elements might not be testable.*


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
pauljohanneskraft authored Nov 4, 2024
1 parent 2dcd268 commit de6991f
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 de6991f

Please sign in to comment.