KEYCLOAK-13247 NPE during migration when manage-account role missing

This commit is contained in:
vramik 2020-03-27 09:38:29 +01:00 committed by Stian Thorgersen
parent acfbdf6b0e
commit 307c9be89d

View file

@ -93,7 +93,8 @@ public class MigrateTo9_0_0 implements Migration {
client.setProtocol("openid-connect"); client.setProtocol("openid-connect");
client.addScopeMapping(realm.getClientByClientId(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID).getRole(AccountRoles.MANAGE_ACCOUNT)); RoleModel role = realm.getClientByClientId(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID).getRole(AccountRoles.MANAGE_ACCOUNT);
if (role != null) client.addScopeMapping(role);
ProtocolMapperModel audienceMapper = new ProtocolMapperModel(); ProtocolMapperModel audienceMapper = new ProtocolMapperModel();
audienceMapper.setName("audience resolve"); audienceMapper.setName("audience resolve");