diff options
Diffstat (limited to 'openecomp-be/tools/zusammen-tools/src/main/java')
-rw-r--r-- | openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/commands/PopulateUserPermissions.java | 9 |
1 files changed, 6 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); |