AllowAll api policy added
[dmaap/dbcapi.git] / src / main / java / org / onap / dmaap / dbcapi / service / DmaapService.java
index 48ee661..3ea44cc 100644 (file)
@@ -3,6 +3,8 @@
  * org.onap.dmaap
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 package org.onap.dmaap.dbcapi.service;
 
 import java.util.ArrayList;
-
-
-
-
-
-
-
-
-
-
 import org.onap.dmaap.dbcapi.aaf.AafService;
 import org.onap.dmaap.dbcapi.aaf.DmaapGrant;
 import org.onap.dmaap.dbcapi.aaf.DmaapPerm;
@@ -43,7 +35,6 @@ import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum;
 import org.onap.dmaap.dbcapi.model.ApiError;
 import org.onap.dmaap.dbcapi.model.Dmaap;
 import org.onap.dmaap.dbcapi.model.MR_Client;
-import org.onap.dmaap.dbcapi.model.ReplicationType;
 import org.onap.dmaap.dbcapi.model.Topic;
 import org.onap.dmaap.dbcapi.model.DmaapObject.DmaapObject_Status;
 import org.onap.dmaap.dbcapi.util.DmaapConfig;
@@ -96,7 +87,7 @@ public class DmaapService  extends BaseLoggingClass  {
                        
                        AafService aaf = new AafService( ServiceType.AAF_Admin);
                        ApiPolicy apiPolicy = new ApiPolicy();
-                       if ( apiPolicy.getUseAuthClass() ) {
+                       if ( apiPolicy.isPermissionClassSet() ) {
                                ApiPerms p = new ApiPerms();
                                p.setEnvMap();
                        }
@@ -139,7 +130,7 @@ public class DmaapService  extends BaseLoggingClass  {
                        dmaapholder.update(nd);  //need to set this so the following perms will pick up any new vals.
                        //dcaeTopicNs = dmaapholder.get().getTopicNsRoot();
                        ApiPolicy apiPolicy = new ApiPolicy();
-                       if ( apiPolicy.getUseAuthClass()) {
+                       if ( apiPolicy.isPermissionClassSet()) {
                                ApiPerms p = new ApiPerms();
                                p.setEnvMap();
                        }