Compare commits
No commits in common. "57dc8aa2bbb07c5f13a35b73dae1718c464d1ebc" and "d269f3088f7137666f17e8c710f955a2a348bf44" have entirely different histories.
57dc8aa2bb
...
d269f3088f
1
admin.go
1
admin.go
@ -6,6 +6,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
"log"
|
||||||
|
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
6
main.go
6
main.go
@ -56,8 +56,6 @@ type ConfigFile struct {
|
|||||||
S3SecretKey string `json:"s3_secret_key"`
|
S3SecretKey string `json:"s3_secret_key"`
|
||||||
S3Region string `json:"s3_region"`
|
S3Region string `json:"s3_region"`
|
||||||
S3Bucket string `json:"s3_bucket"`
|
S3Bucket string `json:"s3_bucket"`
|
||||||
|
|
||||||
Org string `json:"org"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var configFlag = flag.String("config", "./config.json", "Configuration file path")
|
var configFlag = flag.String("config", "./config.json", "Configuration file path")
|
||||||
@ -82,8 +80,6 @@ func readConfig() ConfigFile {
|
|||||||
|
|
||||||
InvitationNameAttr: "cn",
|
InvitationNameAttr: "cn",
|
||||||
InvitedAutoGroups: []string{},
|
InvitedAutoGroups: []string{},
|
||||||
|
|
||||||
Org: "ResDigita",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := os.Stat(*configFlag)
|
_, err := os.Stat(*configFlag)
|
||||||
@ -325,7 +321,6 @@ func ldapOpen(w http.ResponseWriter) *ldap.Conn {
|
|||||||
type HomePageData struct {
|
type HomePageData struct {
|
||||||
Login *LoginStatus
|
Login *LoginStatus
|
||||||
BaseDN string
|
BaseDN string
|
||||||
Org string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleHome(w http.ResponseWriter, r *http.Request) {
|
func handleHome(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -339,7 +334,6 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
|
|||||||
data := &HomePageData{
|
data := &HomePageData{
|
||||||
Login: login,
|
Login: login,
|
||||||
BaseDN: config.BaseDN,
|
BaseDN: config.BaseDN,
|
||||||
Org: config.Org,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
templateHome.Execute(w, data)
|
templateHome.Execute(w, data)
|
||||||
|
@ -3,6 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
"log"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
)
|
)
|
||||||
|
@ -16,12 +16,8 @@
|
|||||||
<div class="list-group list-group-flush">
|
<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="/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="/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="/directory">Annuaire</a>
|
||||||
-->
|
</div>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
@ -40,7 +36,7 @@
|
|||||||
{{if .Login.CanInvite}}
|
{{if .Login.CanInvite}}
|
||||||
<div class="card mt-3">
|
<div class="card mt-3">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
Inviter des gens sur {{.Org}}
|
Inviter des gens sur Deuxfleurs
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group list-group-flush">
|
<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>
|
<a class="list-group-item list-group-item-action" href="/invite/send_code">Envoyer un code d'invitation</a>
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container mb-4">
|
<div class="container mb-4">
|
||||||
<h1>Guichet Les Grands Voisins</h1>
|
<h1>Guichet Les Grands Voisins</h1>
|
||||||
<ul></ul>
|
|
||||||
<hr />
|
<hr />
|
||||||
{{template "body" .}}
|
{{template "body" .}}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user