Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

[Bug] _include issue when system scopes are not set to * #78

Closed
medhost-gkersting opened this issue Feb 24, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@medhost-gkersting
Copy link

Describe the bug
An issue occurs when we have specific system scopes specified (Ex. system/DocumentReference.read and system/Patient.read, no system/*.read it will only return the resource that was requested and it filters out all of the included resources.

Example: We request a DocumentReference and do an _include to get the Patient resource.

If we have system/DocumentReference.read and system/Patient.read as scopes, it will only return the DocumentReference resource. If we have system/*.read it will return both. It appears to be in the getValidOperationsForScope function in smartScopeHelper.ts. The hasAccessToResource function filters the included Patient out because only DocumentReference is in the usable scopes.

Expected behavior
The expected result would be for it to check against the full list of scopes to see if it was valid.

@ssvegaraju
Copy link
Contributor

Hi @medhost-gkersting, just wanted to reach out to let you know that a fix for this issue has been merged in! Thanks for bringing up this issue, I'll go ahead close it but feel free to reopen if there's anything else!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants