1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

feat(demo): disable features on demo env [EE-1874] (#6040)

This commit is contained in:
Chaim Lev-Ari 2022-05-22 08:34:09 +03:00 committed by GitHub
parent 3791b7a16f
commit 12cddbd896
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 492 additions and 56 deletions

View file

@ -113,6 +113,11 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) *
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to retrieve the settings from the database", err}
}
if handler.demoService.IsDemo() {
payload.EnableTelemetry = nil
payload.LogoURL = nil
}
if payload.AuthenticationMethod != nil {
settings.AuthenticationMethod = portainer.AuthenticationMethod(*payload.AuthenticationMethod)
}