From: Pamela Dragosh Date: Wed, 17 Feb 2021 15:40:27 +0000 (-0600) Subject: Fix wrong category for timeRange X-Git-Tag: 2.4.0~6 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=8cea7022f62f1dba805564acd3f71525cdf95e23;p=policy%2Fxacml-pdp.git Fix wrong category for timeRange The category is wrong, and will not work. So fixing this bug first before working in the changes for use new Time Extensions. I may make it all configurable. Issue-ID: POLICY-2810 Change-Id: I4a338242dd4ec35f9b45fa1f46609dea93e286a1 Signed-off-by: Pamela Dragosh --- diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java index 2b713740..ddb9bb07 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -317,7 +317,7 @@ public class GuardTranslator implements ToscaPolicyTranslator { ((Map) timeRange).get("start_time").toString(), XACML3.ID_DATATYPE_TIME, XACML3.ID_ENVIRONMENT_CURRENT_TIME, - XACML3.ID_ATTRIBUTE_CATEGORY_RESOURCE); + XACML3.ID_ATTRIBUTE_CATEGORY_ENVIRONMENT); allOf.getMatch().add(matchStart);