-
Notifications
You must be signed in to change notification settings - Fork 21
fix: handle include/revInclude correctly #92
Conversation
Other than the unit tests, were there any other tests run to verify functionality? |
@@ -378,6 +392,7 @@ export class SMARTHandler implements Authorization { | |||
this.adminAccessTypes, | |||
fhirServiceBaseUrl, | |||
this.fhirVersion, | |||
'write', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not want to do the same validation as for read requests above here for write requests? I know the bug was mainly introduced with the search feature, but is there any chance it could be replicated for write through a Bundle or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added more test to address this comment, let me know your thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good!
@@ -172,16 +172,5 @@ export function filterOutUnusableScope( | |||
), | |||
); | |||
|
|||
// We should only return the scopes iff there is at least 1 valid scope for the given resourceType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this logic instead of updating it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the removal of search-type
from this line
if (resourceType === '*' || resourceType === reqResourceType) { |
We will have the same behavior described in this comment
I was able to deploy and test locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Issue #, if available: #83
Description of changes:
search-type
operation fromfilterOutUnusableScope
toauthorizeAndFilterReadResponse
hasSystemAccess
more explicitBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.