Merge branch 'develop' into oath-poc
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user