mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-15 23:06:38 +00:00
[management] Allow updating embedded IdP user name and email (#5721)
This commit is contained in:
@@ -780,9 +780,15 @@ func (am *DefaultAccountManager) processUserUpdate(ctx context.Context, transact
|
||||
updatedUser.Role = update.Role
|
||||
updatedUser.Blocked = update.Blocked
|
||||
updatedUser.AutoGroups = update.AutoGroups
|
||||
// these two fields can't be set via API, only via direct call to the method
|
||||
// these fields can't be set via API, only via direct call to the method
|
||||
updatedUser.Issued = update.Issued
|
||||
updatedUser.IntegrationReference = update.IntegrationReference
|
||||
if update.Name != "" {
|
||||
updatedUser.Name = update.Name
|
||||
}
|
||||
if update.Email != "" {
|
||||
updatedUser.Email = update.Email
|
||||
}
|
||||
|
||||
var transferredOwnerRole bool
|
||||
result, err := handleOwnerRoleTransfer(ctx, transaction, initiatorUser, update)
|
||||
|
||||
@@ -4414,6 +4414,9 @@ components:
|
||||
items:
|
||||
type: string
|
||||
example: [ "Users" ]
|
||||
connector_id:
|
||||
type: string
|
||||
description: DEX connector ID for embedded IDP setups
|
||||
IntegrationEnabled:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -1492,6 +1492,9 @@ type AzureIntegration struct {
|
||||
// ClientId Azure AD application (client) ID
|
||||
ClientId string `json:"client_id"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
@@ -1632,6 +1635,9 @@ type CreateAzureIntegrationRequest struct {
|
||||
// ClientSecret Base64-encoded Azure AD client secret
|
||||
ClientSecret string `json:"client_secret"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// GroupPrefixes List of start_with string patterns for groups to sync
|
||||
GroupPrefixes *[]string `json:"group_prefixes,omitempty"`
|
||||
|
||||
@@ -1653,6 +1659,9 @@ type CreateAzureIntegrationRequestHost string
|
||||
|
||||
// CreateGoogleIntegrationRequest defines model for CreateGoogleIntegrationRequest.
|
||||
type CreateGoogleIntegrationRequest struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// CustomerId Customer ID from Google Workspace Account Settings
|
||||
CustomerId string `json:"customer_id"`
|
||||
|
||||
@@ -1689,6 +1698,9 @@ type CreateOktaScimIntegrationRequest struct {
|
||||
// ConnectionName The Okta enterprise connection name on Auth0
|
||||
ConnectionName string `json:"connection_name"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// GroupPrefixes List of start_with string patterns for groups to sync
|
||||
GroupPrefixes *[]string `json:"group_prefixes,omitempty"`
|
||||
|
||||
@@ -1698,6 +1710,9 @@ type CreateOktaScimIntegrationRequest struct {
|
||||
|
||||
// CreateScimIntegrationRequest defines model for CreateScimIntegrationRequest.
|
||||
type CreateScimIntegrationRequest struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// GroupPrefixes List of start_with string patterns for groups to sync
|
||||
GroupPrefixes *[]string `json:"group_prefixes,omitempty"`
|
||||
|
||||
@@ -2154,6 +2169,9 @@ type GetTenantsResponse = []TenantResponse
|
||||
|
||||
// GoogleIntegration defines model for GoogleIntegration.
|
||||
type GoogleIntegration struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// CustomerId Customer ID from Google Workspace
|
||||
CustomerId string `json:"customer_id"`
|
||||
|
||||
@@ -2502,6 +2520,9 @@ type IntegrationResponsePlatform string
|
||||
|
||||
// IntegrationSyncFilters defines model for IntegrationSyncFilters.
|
||||
type IntegrationSyncFilters struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// GroupPrefixes List of start_with string patterns for groups to sync
|
||||
GroupPrefixes *[]string `json:"group_prefixes,omitempty"`
|
||||
|
||||
@@ -2994,6 +3015,9 @@ type OktaScimIntegration struct {
|
||||
// AuthToken SCIM API token (full on creation/regeneration, masked on retrieval)
|
||||
AuthToken string `json:"auth_token"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
@@ -3864,6 +3888,9 @@ type ScimIntegration struct {
|
||||
// AuthToken SCIM API token (full on creation, masked otherwise)
|
||||
AuthToken string `json:"auth_token"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
@@ -4341,6 +4368,9 @@ type UpdateAzureIntegrationRequest struct {
|
||||
// ClientSecret Base64-encoded Azure AD client secret
|
||||
ClientSecret *string `json:"client_secret,omitempty"`
|
||||
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
|
||||
@@ -4359,6 +4389,9 @@ type UpdateAzureIntegrationRequest struct {
|
||||
|
||||
// UpdateGoogleIntegrationRequest defines model for UpdateGoogleIntegrationRequest.
|
||||
type UpdateGoogleIntegrationRequest struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// CustomerId Customer ID from Google Workspace Account Settings
|
||||
CustomerId *string `json:"customer_id,omitempty"`
|
||||
|
||||
@@ -4380,6 +4413,9 @@ type UpdateGoogleIntegrationRequest struct {
|
||||
|
||||
// UpdateOktaScimIntegrationRequest defines model for UpdateOktaScimIntegrationRequest.
|
||||
type UpdateOktaScimIntegrationRequest struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
|
||||
@@ -4392,6 +4428,9 @@ type UpdateOktaScimIntegrationRequest struct {
|
||||
|
||||
// UpdateScimIntegrationRequest defines model for UpdateScimIntegrationRequest.
|
||||
type UpdateScimIntegrationRequest struct {
|
||||
// ConnectorId DEX connector ID for embedded IDP setups
|
||||
ConnectorId *string `json:"connector_id,omitempty"`
|
||||
|
||||
// Enabled Whether the integration is enabled
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user