fix: IDP login button styles (#869)

* fix: styling type on idp

* fix: google styling

* fix: google styling

* fix: google styling

* fix: remove logo src from angular

* fix: pr requests

* fix drop column migration

* fix: drop column migration

* fix: grant id
This commit is contained in:
Fabi
2020-10-19 17:10:02 +02:00
committed by GitHub
parent bb9747923c
commit 4eb380a825
43 changed files with 19230 additions and 10514 deletions

View File

@@ -1,7 +1,6 @@
package model
import (
"bytes"
"encoding/json"
"github.com/caos/logging"
es_models "github.com/caos/zitadel/internal/eventstore/models"
@@ -14,7 +13,7 @@ type IDPConfig struct {
State int32 `json:"-"`
Name string `json:"name,omitempty"`
Type int32 `json:"idpType,omitempty"`
LogoSrc []byte `json:"logoSrc,omitempty"`
StylingType int32 `json:"stylingType,omitempty"`
OIDCIDPConfig *OIDCIDPConfig `json:"-"`
}
@@ -39,8 +38,8 @@ func (c *IDPConfig) Changes(changed *IDPConfig) map[string]interface{} {
if changed.Name != "" && c.Name != changed.Name {
changes["name"] = changed.Name
}
if changed.LogoSrc != nil && bytes.Equal(c.LogoSrc, changed.LogoSrc) {
changes["logoSrc"] = changed.LogoSrc
if changed.StylingType != changed.StylingType {
changes["stylingType"] = changed.StylingType
}
return changes
}
@@ -68,7 +67,7 @@ func IDPConfigFromModel(idp *model.IDPConfig) *IDPConfig {
Name: idp.Name,
State: int32(idp.State),
Type: int32(idp.Type),
LogoSrc: idp.LogoSrc,
StylingType: int32(idp.StylingType),
}
if idp.OIDCConfig != nil {
converted.OIDCIDPConfig = OIDCIDPConfigFromModel(idp.OIDCConfig)
@@ -81,7 +80,7 @@ func IDPConfigToModel(idp *IDPConfig) *model.IDPConfig {
ObjectRoot: idp.ObjectRoot,
IDPConfigID: idp.IDPConfigID,
Name: idp.Name,
LogoSrc: idp.LogoSrc,
StylingType: model.IDPStylingType(idp.StylingType),
State: model.IDPConfigState(idp.State),
Type: model.IdpConfigType(idp.Type),
}