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:
@ -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",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user