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"
|
"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,6 +56,8 @@ 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")
|
||||||
@ -80,6 +82,8 @@ func readConfig() ConfigFile {
|
|||||||
|
|
||||||
InvitationNameAttr: "cn",
|
InvitationNameAttr: "cn",
|
||||||
InvitedAutoGroups: []string{},
|
InvitedAutoGroups: []string{},
|
||||||
|
|
||||||
|
Org: "ResDigita",
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := os.Stat(*configFlag)
|
_, err := os.Stat(*configFlag)
|
||||||
@ -321,6 +325,7 @@ 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) {
|
||||||
@ -334,6 +339,7 @@ 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,8 +3,6 @@ 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,7 +16,11 @@
|
|||||||
<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>
|
||||||
|
-->
|
||||||
|
<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>
|
</div>
|
||||||
@ -36,7 +40,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 Deuxfleurs
|
Inviter des gens sur {{.Org}}
|
||||||
</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,6 +11,7 @@
|
|||||||
<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…
Reference in New Issue
Block a user