added azure related code
[it/otf.git] / otf-service-api / src / main / java / org / oran / otf / api / service / impl / TestStrategyServiceImpl.java
index 13d125a..afc0f24 100644 (file)
@@ -108,7 +108,7 @@ public class TestStrategyServiceImpl implements TestStrategyService {
     //                 logger.error(Utilities.getStackTrace(e));\r
     //         }\r
 \r
-    // If a test definition id is supplied, the request intends to update an existing test\r
+    // If a test definition id is supplied, the request intends to  updatean existing test\r
     // definition.\r
     if (request.getTestDefinitionId() != null) {\r
       // Check if the test definition exists in the database.\r
@@ -212,8 +212,7 @@ public class TestStrategyServiceImpl implements TestStrategyService {
 \r
   private boolean isAuthorized(String authorization) {\r
     User user = Utilities.findUserByAuthHeader(authorization, userRepository);\r
-    return (user.getEmail().equalsIgnoreCase("email@localhost")\r
-        || user.getEmail().equalsIgnoreCase("email@localhost"));\r
+    return (user.getEmail().equalsIgnoreCase(System.getenv("AAF_ID")));\r
   }\r
 \r
   private DeployTestStrategyRequest mapToDeployTestStrategyRequest(String body) {\r