Merge pull request #762 from dconlan/master

Auth Interceptor - make sure Id has a type before trying to get its associated resource
This commit is contained in:
James Agnew 2017-11-23 06:40:14 -05:00 committed by GitHub
commit 193edea1a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ class RuleImplOp extends BaseRule /* implements IAuthRule */ {
return null;
}
}
if (appliesToResourceId != null) {
if (appliesToResourceId != null && appliesToResourceId.hasResourceType()) {
Class<? extends IBaseResource> type = theRequestDetails.getServer().getFhirContext().getResourceDefinition(appliesToResourceId.getResourceType()).getImplementingClass();
if (myAppliesToTypes.contains(type) == false) {
return null;