converted permissions to biconsumer

This commit is contained in:
Ken Stevens 2021-12-29 16:36:17 -05:00
parent 1c318aac1e
commit fe77a23e39
1 changed files with 19 additions and 4 deletions

View File

@ -21,6 +21,9 @@ package ca.uhn.fhir.rest.server.interceptor.auth;
*/ */
import ca.uhn.fhir.rest.api.server.bulk.BulkDataExportOptions; import ca.uhn.fhir.rest.api.server.bulk.BulkDataExportOptions;
import org.hl7.fhir.instance.model.api.IBaseResource;
import java.util.HashSet;
public final class OperationRuleTestUtil { public final class OperationRuleTestUtil {
private OperationRuleTestUtil() {} private OperationRuleTestUtil() {}
@ -33,14 +36,26 @@ public final class OperationRuleTestUtil {
return ((OperationRule)theRule).isAppliesToServer(); return ((OperationRule)theRule).isAppliesToServer();
} }
public static boolean isAllowAllResponses(IAuthRule theRule) {
return ((OperationRule)theRule).isAllowAllResponses();
}
public static boolean isAppliesToAnyType(IAuthRule theRule) { public static boolean isAppliesToAnyType(IAuthRule theRule) {
return ((OperationRule)theRule).isAppliesToAnyType(); return ((OperationRule)theRule).isAppliesToAnyType();
} }
public static boolean isAppliesToAnyInstance(IAuthRule theRule) {
return ((OperationRule)theRule).isAppliesToAnyInstance();
}
public static HashSet<Class<? extends IBaseResource>> getAppliesToTypes(IAuthRule theRule) {
return ((OperationRule)theRule).getAppliesToTypes();
}
public static HashSet<Class<? extends IBaseResource>> getAppliesToInstancesOfType(IAuthRule theRule) {
return ((OperationRule)theRule).getAppliesToInstancesOfType();
}
public static boolean isAllowAllResponses(IAuthRule theRule) {
return ((OperationRule)theRule).isAllowAllResponses();
}
public static String getGroupId(IAuthRule theRule) { public static String getGroupId(IAuthRule theRule) {
return ((RuleBulkExportImpl)theRule).getGroupId(); return ((RuleBulkExportImpl)theRule).getGroupId();
} }