KEYCLOAK-18009 Invalid role creation with oracle database
This commit is contained in:
parent
0a4fdc64f3
commit
020dd530b9
2 changed files with 2 additions and 1 deletions
|
@ -245,9 +245,9 @@ public class JpaRealmProvider implements RealmProvider, ClientProvider, ClientSc
|
||||||
RoleEntity roleEntity = new RoleEntity();
|
RoleEntity roleEntity = new RoleEntity();
|
||||||
roleEntity.setId(id);
|
roleEntity.setId(id);
|
||||||
roleEntity.setName(name);
|
roleEntity.setName(name);
|
||||||
|
roleEntity.setRealmId(client.getRealm().getId());
|
||||||
roleEntity.setClientId(client.getId());
|
roleEntity.setClientId(client.getId());
|
||||||
roleEntity.setClientRole(true);
|
roleEntity.setClientRole(true);
|
||||||
roleEntity.setRealmId(client.getRealm().getId());
|
|
||||||
em.persist(roleEntity);
|
em.persist(roleEntity);
|
||||||
RoleAdapter adapter = new RoleAdapter(session, client.getRealm(), em, roleEntity);
|
RoleAdapter adapter = new RoleAdapter(session, client.getRealm(), em, roleEntity);
|
||||||
return adapter;
|
return adapter;
|
||||||
|
|
|
@ -115,6 +115,7 @@ public class RoleEntity {
|
||||||
|
|
||||||
public void setRealmId(String realmId) {
|
public void setRealmId(String realmId) {
|
||||||
this.realmId = realmId;
|
this.realmId = realmId;
|
||||||
|
this.clientRealmConstraint = realmId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RoleAttributeEntity> getAttributes() {
|
public List<RoleAttributeEntity> getAttributes() {
|
||||||
|
|
Loading…
Reference in a new issue