diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java index 65603cb9198..a8b8e113053 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/auth/RuleImplOp.java @@ -225,7 +225,7 @@ class RuleImplOp extends BaseRule /* implements IAuthRule */ { return null; } } - if (appliesToResourceId != null) { + if (appliesToResourceId != null && appliesToResourceId.hasResourceType()) { Class type = theRequestDetails.getServer().getFhirContext().getResourceDefinition(appliesToResourceId.getResourceType()).getImplementingClass(); if (myAppliesToTypes.contains(type) == false) { return null;