Compare commits
4 Commits
d269f3088f
...
57dc8aa2bb
Author | SHA1 | Date | |
---|---|---|---|
57dc8aa2bb | |||
|
684b62ad91 | ||
|
75d524f1ab | ||
|
7bee9941d3 |
1
admin.go
1
admin.go
@ -6,7 +6,6 @@ import (
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"log"
|
||||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
"github.com/gorilla/mux"
|
||||
|
6
main.go
6
main.go
@ -56,6 +56,8 @@ type ConfigFile struct {
|
||||
S3SecretKey string `json:"s3_secret_key"`
|
||||
S3Region string `json:"s3_region"`
|
||||
S3Bucket string `json:"s3_bucket"`
|
||||
|
||||
Org string `json:"org"`
|
||||
}
|
||||
|
||||
var configFlag = flag.String("config", "./config.json", "Configuration file path")
|
||||
@ -80,6 +82,8 @@ func readConfig() ConfigFile {
|
||||
|
||||
InvitationNameAttr: "cn",
|
||||
InvitedAutoGroups: []string{},
|
||||
|
||||
Org: "ResDigita",
|
||||
}
|
||||
|
||||
_, err := os.Stat(*configFlag)
|
||||
@ -321,6 +325,7 @@ func ldapOpen(w http.ResponseWriter) *ldap.Conn {
|
||||
type HomePageData struct {
|
||||
Login *LoginStatus
|
||||
BaseDN string
|
||||
Org string
|
||||
}
|
||||
|
||||
func handleHome(w http.ResponseWriter, r *http.Request) {
|
||||
@ -334,6 +339,7 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
|
||||
data := &HomePageData{
|
||||
Login: login,
|
||||
BaseDN: config.BaseDN,
|
||||
Org: config.Org,
|
||||
}
|
||||
|
||||
templateHome.Execute(w, data)
|
||||
|
@ -3,8 +3,6 @@ package main
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
"log"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
)
|
||||
|
@ -16,7 +16,11 @@
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action" href="/profile">Modifier mon profil</a>
|
||||
<a class="list-group-item list-group-item-action" href="/passwd">Modifier mon mot de passe</a>
|
||||
<!--
|
||||
<a class="list-group-item list-group-item-action" href="/directory">Annuaire</a>
|
||||
-->
|
||||
<a class="list-group-item list-group-item-action" href="/SOGo">Accéder à mes curriels, mon agenda et à mes contacts</a>
|
||||
<a class="list-group-item list-group-item-action" href="https://www.lesgrandsvoisins.com/resdigita">Accéder au numérique des Grands Voisins .com</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -36,7 +40,7 @@
|
||||
{{if .Login.CanInvite}}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
Inviter des gens sur Deuxfleurs
|
||||
Inviter des gens sur {{.Org}}
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a class="list-group-item list-group-item-action" href="/invite/send_code">Envoyer un code d'invitation</a>
|
||||
|
@ -11,6 +11,7 @@
|
||||
<body>
|
||||
<div class="container mb-4">
|
||||
<h1>Guichet Les Grands Voisins</h1>
|
||||
<ul></ul>
|
||||
<hr />
|
||||
{{template "body" .}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user