mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-1908 user flow fixes
This commit is contained in:
+1
-1
@@ -890,7 +890,7 @@ public class WebSession extends AbstractSessionPersistent implements SMSession,
|
||||
this.sessionPermissions = null;
|
||||
this.smCredentials = null;
|
||||
this.user = null;
|
||||
this.securityController = application.getSecurityController(null);
|
||||
this.securityController = application.getSecurityController(this);
|
||||
this.adminSecurityController = null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class WebServiceAuthImpl implements DBWServiceAuth {
|
||||
|
||||
// Check enabled auth providers
|
||||
boolean providerEnabled = isProviderEnabled(providerId, authProvider);
|
||||
boolean resetUserStateOnError = webSession.getUser() != null;
|
||||
boolean resetUserStateOnError = webSession.getUser() == null;
|
||||
|
||||
try {
|
||||
Map<String, Object> providerConfig = Collections.emptyMap();
|
||||
|
||||
+5
-4
@@ -849,11 +849,12 @@ public class CBSecurityController implements SMAdminController<WebUser, WebRole>
|
||||
if (!isSubjectExists(userId)) {
|
||||
var newUser = new WebUser(userId);
|
||||
createUser(newUser.getUserId(), newUser.getMetaParameters());
|
||||
String defaultRoleName = WebAppUtils.getWebApplication().getAppConfiguration().getDefaultUserRole();
|
||||
if (!CommonUtils.isEmpty(defaultRoleName)) {
|
||||
setUserRoles(userId, new String[]{defaultRoleName}, userId);
|
||||
}
|
||||
}
|
||||
String defaultRoleName = WebAppUtils.getWebApplication().getAppConfiguration().getDefaultUserRole();
|
||||
if (!CommonUtils.isEmpty(defaultRoleName)) {
|
||||
setUserRoles(userId, new String[]{defaultRoleName}, userId);
|
||||
}
|
||||
|
||||
setUserCredentials(userId, authProviderId, userCredentials);
|
||||
|
||||
return userId;
|
||||
|
||||
Reference in New Issue
Block a user