diff options
Diffstat (limited to 'openecomp-be/tools/zusammen-tools')
2 files changed, 7 insertions, 3 deletions
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/commands/PopulateUserPermissions.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/commands/PopulateUserPermissions.java index bf85bd19b5..fb415c5653 100644 --- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/commands/PopulateUserPermissions.java +++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/commands/PopulateUserPermissions.java @@ -28,14 +28,17 @@ public class PopulateUserPermissions { private PopulateUserPermissions(){ } - public static void execute(){ + public static void execute() { List<ItemPermissionsEntity> permissions = permissionHandler.getAll(); - permissions.forEach(itemPermissionsEntity -> + permissions.forEach(itemPermissionsEntity -> { + if (!itemPermissionsEntity.getUserId().isEmpty() && !itemPermissionsEntity.getPermission().isEmpty()) { permissionHandler.addItem (Collections.singleton(itemPermissionsEntity.getItemId()), - itemPermissionsEntity.getUserId(),itemPermissionsEntity.getPermission())); + itemPermissionsEntity.getUserId(),itemPermissionsEntity.getPermission()); + } + }); System.exit(0); diff --git a/openecomp-be/tools/zusammen-tools/src/main/resources/zusammenMainTool.sh b/openecomp-be/tools/zusammen-tools/src/main/resources/zusammenMainTool.sh index 1bd91230d7..54be5e74ef 100644 --- a/openecomp-be/tools/zusammen-tools/src/main/resources/zusammenMainTool.sh +++ b/openecomp-be/tools/zusammen-tools/src/main/resources/zusammenMainTool.sh @@ -9,6 +9,7 @@ # 4. Import all - ./zusammenMainTool.sh -c IMPORT -f ${fileName} # 5. Reset old version - ./zusammenMainTool.sh -c RESET_OLD_VERSION # 6. Heal all - ./zusammenMainTool.sh -c HEAL_ALL -t ${thread number} +# 7. Populate User Permissions - ./zusammenMainTool.sh -c POPULATE_USER_PERMISSIONS # ########################################################################################################## |