Ajout d'un lien de contact/support dans la page de profil

Adresse de contact et sujet par défaut configurable dans le fichier de
configuration
This commit is contained in:
2019-05-31 13:46:17 +02:00
parent 898301bf65
commit e62837d7be
3 changed files with 17 additions and 2 deletions

View File

@ -7,8 +7,9 @@ import (
)
type Config struct {
HTTP HTTPConfig
LDAP LDAPConfig
HTTP HTTPConfig
LDAP LDAPConfig
Contact ContactConfig
}
type HTTPConfig struct {
@ -23,6 +24,11 @@ type LDAPConfig struct {
UserSearchFilterPattern string
}
type ContactConfig struct {
Email string
Subject string
}
// NewFromFile retrieves the configuration from the given file
func NewFromFile(filepath string) (*Config, error) {
config := NewDefault()
@ -48,6 +54,10 @@ func NewDefault() *Config {
BaseDN: "o=org,c=fr",
UserSearchFilterPattern: "(&(objectClass=person)(uid=%s))",
},
Contact: ContactConfig{
Email: "contact@cadoles-profile.local",
Subject: "[Cadoles Profile] Help needed",
},
}
}