Merge pull request #3743 from mposolda/master
KEYCLOAK-4137 Significant performance lag in 'get client role by role…
This commit is contained in:
commit
5e1ec459e5
2 changed files with 2 additions and 8 deletions
|
@ -569,10 +569,7 @@ public class ClientAdapter implements ClientModel {
|
|||
|
||||
@Override
|
||||
public RoleModel getRole(String name) {
|
||||
for (RoleModel role : getRoles()) {
|
||||
if (role.getName().equals(name)) return role;
|
||||
}
|
||||
return null;
|
||||
return cacheSession.getClientRole(getRealm(), this, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -801,10 +801,7 @@ public class RealmAdapter implements CachedRealmModel {
|
|||
|
||||
@Override
|
||||
public RoleModel getRole(String name) {
|
||||
for (RoleModel role : getRoles()) {
|
||||
if (role.getName().equals(name)) return role;
|
||||
}
|
||||
return null;
|
||||
return cacheSession.getRealmRole(this, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue