From 1c3cc6fb0e4d2f4f2278240ff0387596c776b9c9 Mon Sep 17 00:00:00 2001 From: "Kishore Reddy, Gujja (kg811t)" Date: Fri, 12 Oct 2018 16:53:15 -0400 Subject: [PATCH] ExtAccessRolesServiceImpl.class and sql Issue-ID: PORTAL-389 Fixed AAF sync roles to onap portal Change-Id: Ibd36737deda72fe7c6984c89001d72ca1a5126c5 Signed-off-by: Kishore Reddy, Gujja (kg811t) --- .../onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java | 4 +--- ecomp-portal-DB-common/PortalDDLMySql_2_1_Common.sql | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java index f83a8e34..c528e55e 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java @@ -841,6 +841,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic if (EcompPortalUtils.checkIfRemoteCentralAccessAllowed()) { addNewRoleInExternalSystem(getRoleCreated, app); } + result = true; } else { // if role already exists then update it EPRole globalRole = null; List applicationRoles; @@ -2819,9 +2820,6 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic JSONObject Role = (JSONObject) extRole.get(i); String name = extRole.getJSONObject(i).getString(ROLE_NAME); String actualRoleName = name.substring(app.getNameSpace().length() + 1); - if (extRole.getJSONObject(i).has(EXTERNAL_AUTH_ROLE_DESCRIPTION)) { - actualRoleName = extRole.getJSONObject(i).getString(EXTERNAL_AUTH_ROLE_DESCRIPTION); - } SortedSet externalAccessPermsOfRole = new TreeSet<>(); if (extRole.getJSONObject(i).has(EXTERNAL_AUTH_PERMS)) { JSONArray extPerm = (JSONArray) Role.get(EXTERNAL_AUTH_PERMS); diff --git a/ecomp-portal-DB-common/PortalDDLMySql_2_1_Common.sql b/ecomp-portal-DB-common/PortalDDLMySql_2_1_Common.sql index cabca678..6cb26434 100644 --- a/ecomp-portal-DB-common/PortalDDLMySql_2_1_Common.sql +++ b/ecomp-portal-DB-common/PortalDDLMySql_2_1_Common.sql @@ -1280,7 +1280,7 @@ create table ep_endpoints_basic_auth_account ( CREATE TABLE ep_app_function ( app_id INT(11) NOT NULL, function_cd VARCHAR(250) NOT NULL, -function_name VARCHAR(50) NOT NULL, +function_name VARCHAR(250) NOT NULL, PRIMARY KEY (function_cd, app_id), INDEX fk_ep_app_function_app_id (app_id), CONSTRAINT fk_ep_app_function_app_id FOREIGN KEY (app_id) REFERENCES fn_app (app_id) -- 2.16.6