mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
Merge branch 'develop' into oath-poc
This commit is contained in:
commit
508352f4ea
53 changed files with 626 additions and 452 deletions
|
@ -42,7 +42,7 @@ func (handler *Handler) extensionCreate(w http.ResponseWriter, r *http.Request)
|
|||
}
|
||||
|
||||
for _, existingExtension := range extensions {
|
||||
if existingExtension.ID == extensionID {
|
||||
if existingExtension.ID == extensionID && existingExtension.Enabled {
|
||||
return &httperror.HandlerError{http.StatusConflict, "Unable to enable extension", portainer.ErrExtensionAlreadyEnabled}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ func associateExtensionData(definition *portainer.Extension, extensions []portai
|
|||
definition.Enabled = extension.Enabled
|
||||
definition.License.Company = extension.License.Company
|
||||
definition.License.Expiration = extension.License.Expiration
|
||||
definition.License.Valid = extension.License.Valid
|
||||
|
||||
definitionVersion := semver.New(definition.Version)
|
||||
extensionVersion := semver.New(extension.Version)
|
||||
|
|
|
@ -67,7 +67,12 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) *
|
|||
}
|
||||
|
||||
if payload.LDAPSettings != nil {
|
||||
ldapPassword := settings.LDAPSettings.Password
|
||||
if payload.LDAPSettings.Password != "" {
|
||||
ldapPassword = payload.LDAPSettings.Password
|
||||
}
|
||||
settings.LDAPSettings = *payload.LDAPSettings
|
||||
settings.LDAPSettings.Password = ldapPassword
|
||||
}
|
||||
|
||||
if payload.OAuthSettings != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue