KEYCLOAK-13247 NPE during migration when manage-account role missing
This commit is contained in:
parent
acfbdf6b0e
commit
307c9be89d
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue