aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMrArmonius <mrarmonius@gmail.com>2021-07-30 00:04:17 +0200
committerAlex Auvolat <alex@adnab.me>2021-08-16 12:54:08 +0200
commita2a484daba1ef42d82f596a989caf203ee9a370f (patch)
treea3ec45738fa59448dd99d6dd5e69172f18043e90 /main.go
parent0ca6a159b215967a6d13b9bad5c008983e032c3f (diff)
downloadguichet-a2a484daba1ef42d82f596a989caf203ee9a370f.tar.gz
guichet-a2a484daba1ef42d82f596a989caf203ee9a370f.zip
Add profile image front-end and back-end
Correct when empty result The image showed when the result was empty. Now if the `dn == ""` then we write in the column image just `""`
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index 98a9cdd..7dc51df 100644
--- a/main.go
+++ b/main.go
@@ -43,6 +43,10 @@ type ConfigFile struct {
AdminAccount string `json:"admin_account"`
GroupCanInvite string `json:"group_can_invite"`
GroupCanAdmin string `json:"group_can_admin"`
+
+ Endpoint string `json:"endpoint"`
+ AccesKey string `json:"acces_key"`
+ SecretKey string `json:"secret_key"`
}
var configFlag = flag.String("config", "./config.json", "Configuration file path")
@@ -133,6 +137,8 @@ func main() {
r.HandleFunc("/profile", handleProfile)
r.HandleFunc("/passwd", handlePasswd)
+ r.HandleFunc("/image/{name}/{size}", handleDownloadImage)
+
r.HandleFunc("/directory", handleDirectory)
r.HandleFunc("/search/{input}", handleSearch)
@@ -244,7 +250,7 @@ func checkLogin(w http.ResponseWriter, r *http.Request) *LoginStatus {
login_info.DN,
ldap.ScopeBaseObject, ldap.NeverDerefAliases, 0, 0, false,
requestKind,
- []string{"dn", "displayname", "givenname", "sn", "mail", "memberof", "visibility", "description"},
+ []string{"dn", "displayname", "givenname", "sn", "mail", "memberof", "visibility", "description", "profilImage"},
nil)
sr, err := l.Search(searchRequest)