fix merge conflict mistakes
This commit is contained in:
parent
43bad9a608
commit
38a2ea2fdf
4 changed files with 4 additions and 3 deletions
|
@ -131,6 +131,7 @@ public class DefaultCacheUserProvider implements CacheUserProvider {
|
||||||
if (cached == null) {
|
if (cached == null) {
|
||||||
UserModel model = getDelegate().getUserById(id, realm);
|
UserModel model = getDelegate().getUserById(id, realm);
|
||||||
if (model == null) return null;
|
if (model == null) return null;
|
||||||
|
if (managedUsers.containsKey(id)) return managedUsers.get(id);
|
||||||
if (userInvalidations.containsKey(id)) return model;
|
if (userInvalidations.containsKey(id)) return model;
|
||||||
cached = new CachedUser(realm, model);
|
cached = new CachedUser(realm, model);
|
||||||
cache.addCachedUser(realm.getId(), cached);
|
cache.addCachedUser(realm.getId(), cached);
|
||||||
|
@ -155,6 +156,7 @@ public class DefaultCacheUserProvider implements CacheUserProvider {
|
||||||
if (cached == null) {
|
if (cached == null) {
|
||||||
UserModel model = getDelegate().getUserByUsername(username, realm);
|
UserModel model = getDelegate().getUserByUsername(username, realm);
|
||||||
if (model == null) return null;
|
if (model == null) return null;
|
||||||
|
if (managedUsers.containsKey(model.getId())) return managedUsers.get(model.getId());
|
||||||
if (userInvalidations.containsKey(model.getId())) return model;
|
if (userInvalidations.containsKey(model.getId())) return model;
|
||||||
cached = new CachedUser(realm, model);
|
cached = new CachedUser(realm, model);
|
||||||
cache.addCachedUser(realm.getId(), cached);
|
cache.addCachedUser(realm.getId(), cached);
|
||||||
|
|
|
@ -246,7 +246,6 @@ public class AccountTest {
|
||||||
events.expectLogin().session((String) null).error("invalid_user_credentials")
|
events.expectLogin().session((String) null).error("invalid_user_credentials")
|
||||||
.removeDetail(Details.CONSENT)
|
.removeDetail(Details.CONSENT)
|
||||||
.assertEvent();
|
.assertEvent();
|
||||||
events.expectLogin().session((String) null).user(userId).error("invalid_user_credentials").assertEvent();
|
|
||||||
|
|
||||||
loginPage.open();
|
loginPage.open();
|
||||||
loginPage.login("test-user@localhost", "new-password");
|
loginPage.login("test-user@localhost", "new-password");
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class LoginTest {
|
||||||
|
|
||||||
Assert.assertEquals("Account is disabled, contact admin.", loginPage.getError());
|
Assert.assertEquals("Account is disabled, contact admin.", loginPage.getError());
|
||||||
|
|
||||||
events.expectLogin().user(userId).session((String) null).error("invalid_user_credentials")
|
events.expectLogin().user(userId).session((String) null).error("user_disabled")
|
||||||
.detail(Details.USERNAME, "login-test")
|
.detail(Details.USERNAME, "login-test")
|
||||||
.removeDetail(Details.CONSENT)
|
.removeDetail(Details.CONSENT)
|
||||||
.assertEvent();
|
.assertEvent();
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class OAuthGrantTest {
|
||||||
oauth.openLoginForm();
|
oauth.openLoginForm();
|
||||||
appPage.assertCurrent();
|
appPage.assertCurrent();
|
||||||
events.expectLogin()
|
events.expectLogin()
|
||||||
.detail(Details.AUTH_METHOD, "sso")
|
.detail(Details.AUTH_METHOD, OIDCLoginProtocol.LOGIN_PROTOCOL)
|
||||||
.detail(Details.CONSENT, Details.CONSENT_VALUE_PERSISTED_CONSENT)
|
.detail(Details.CONSENT, Details.CONSENT_VALUE_PERSISTED_CONSENT)
|
||||||
.removeDetail(Details.USERNAME)
|
.removeDetail(Details.USERNAME)
|
||||||
.client("third-party").assertEvent();
|
.client("third-party").assertEvent();
|
||||||
|
|
Loading…
Reference in a new issue