diff options
author | Alex Auvolat <alex@adnab.me> | 2021-08-16 15:30:14 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-08-16 15:30:14 +0200 |
commit | e94bd728ec7f709883fb232b2eb123543ba5660e (patch) | |
tree | c7f75a9055e370df38dbba0c0f5b0c75a9dd649d /main.go | |
parent | 9e3279b9c04bb07d108fa820a72841b4082c0979 (diff) | |
download | guichet-e94bd728ec7f709883fb232b2eb123543ba5660e.tar.gz guichet-e94bd728ec7f709883fb232b2eb123543ba5660e.zip |
Improve profile editing page & photo uploadingAdd_Directory
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -44,11 +44,11 @@ type ConfigFile struct { GroupCanInvite string `json:"group_can_invite"` GroupCanAdmin string `json:"group_can_admin"` - S3_Endpoint string `json:"s3_endpoint"` - S3_AccesKey string `json:"s3_acces_key"` - S3_SecretKey string `json:"s3_secret_key"` - S3_Region string `json:"s3_region"` - S3_Bucket string `json:"s3_bucket"` + S3Endpoint string `json:"s3_endpoint"` + S3AccessKey string `json:"s3_access_key"` + S3SecretKey string `json:"s3_secret_key"` + S3Region string `json:"s3_region"` + S3Bucket string `json:"s3_bucket"` } var configFlag = flag.String("config", "./config.json", "Configuration file path") @@ -110,13 +110,13 @@ func main() { r := mux.NewRouter() r.HandleFunc("/", handleHome) r.HandleFunc("/logout", handleLogout) + r.HandleFunc("/profile", handleProfile) r.HandleFunc("/passwd", handlePasswd) - - r.HandleFunc("/image/{name}/{size}", handleDownloadImage) + r.HandleFunc("/picture/{name}", handleDownloadPicture) r.HandleFunc("/directory", handleDirectory) - r.HandleFunc("/search/{input}", handleSearch) + r.HandleFunc("/directory/search/{input}", handleSearch) r.HandleFunc("/invite/new_account", handleInviteNewAccount) r.HandleFunc("/invite/send_code", handleInviteSendCode) @@ -226,7 +226,17 @@ 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", PROFILE_PICTURE_FIELD_NAME}, + []string{ + "dn", + "displayname", + "givenname", + "sn", + "mail", + "memberof", + "description", + FIELD_NAME_DIRECTORY_VISIBILITY, + FIELD_NAME_PROFILE_PICTURE, + }, nil) sr, err := l.Search(searchRequest) |