[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".
This commit is contained in:
cc 2020-04-19 03:52:46 +08:00 committed by Marek Posolda
parent aa309b96a8
commit 8876294a72

View file

@ -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<ClientScopeModel> clientScopeModels = realm.getClientScopes();