feat: vendor admin management and shared account settings #59

Merged
hsiegeln merged 19 commits from feature/vendor-admin-account-settings into main 2026-04-27 15:20:23 +02:00
Showing only changes of commit 0da1ffea7f - Show all commits

View File

@@ -222,9 +222,11 @@ public class LogtoManagementClient {
.retrieve()
.body(Map.class);
String userId = String.valueOf(userResp.get("id"));
addUserToOrganization(orgId, userId);
if (roleId != null) {
assignOrganizationRole(orgId, userId, roleId);
if (orgId != null) {
addUserToOrganization(orgId, userId);
if (roleId != null) {
assignOrganizationRole(orgId, userId, roleId);
}
}
return userId;
} catch (Exception e) {
@@ -233,7 +235,7 @@ public class LogtoManagementClient {
}
}
/** Create a user with username/password and add to org with role. */
/** Create a user with username/password and optionally add to org with role. */
@SuppressWarnings("unchecked")
public String createUserWithPassword(String username, String password, String orgId, String roleId) {
if (!isAvailable()) return null;
@@ -246,9 +248,11 @@ public class LogtoManagementClient {
.retrieve()
.body(Map.class);
String userId = String.valueOf(userResp.get("id"));
addUserToOrganization(orgId, userId);
if (roleId != null) {
assignOrganizationRole(orgId, userId, roleId);
if (orgId != null) {
addUserToOrganization(orgId, userId);
if (roleId != null) {
assignOrganizationRole(orgId, userId, roleId);
}
}
log.info("Created user '{}' and added to org {} with role {}", username, orgId, roleId);
return userId;