From 8876294a724afa873f0372e8152a0595746b563c Mon Sep 17 00:00:00 2001 From: cc Date: Sun, 19 Apr 2020 03:52:46 +0800 Subject: [PATCH] [KEYCLOAK-13964] exported realm should include keycloak version, not Project/product version The exported realm json file includes a field named "KeycloakVersion", which is assigned Version.Version. In community edition, Version.Version is identical to Version.KeycloakVersion. If we rebrand product based on keycloak project, Version.Version will be Product version, while keycloak codes expect exported realm file including KeycloakVersion for normal migrating. For RHSSO product, there are somes codes in class MigrationModelManager for converting the right KeycloakVersion. From semantic point, a field named "KeycloakVersion" should be assigned variable named "KeycloakVersion". --- .../main/java/org/keycloak/exportimport/util/ExportUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java b/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java index 1c93da36e8..fc5072071f 100755 --- a/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java +++ b/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java @@ -95,7 +95,7 @@ public class ExportUtils { ModelToRepresentation.exportRequiredActions(realm, rep); // Project/product version - rep.setKeycloakVersion(Version.VERSION); + rep.setKeycloakVersion(Version.VERSION_KEYCLOAK); // Client Scopes List clientScopeModels = realm.getClientScopes();