diff options
Diffstat (limited to 'templates/home.html')
-rw-r--r-- | templates/home.html | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/templates/home.html b/templates/home.html index d55b45f..3f91e7b 100644 --- a/templates/home.html +++ b/templates/home.html @@ -2,7 +2,7 @@ {{define "body"}} <div class="alert alert-success"> - Bienvenue, <strong>{{ .UserEntry.GetAttributeValue "givenname" }}</strong> ! + Bienvenue, <strong>{{ .Login.UserEntry.GetAttributeValue "givenname" }}</strong> ! </div> <div class="d-flex"> <a class="ml-auto btn btn-sm btn-dark" href="/logout">Se déconnecter</a> @@ -16,19 +16,23 @@ <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="/invite">Inviter quelqu'un</a> + {{if .CanInvite}} + <a class="list-group-item list-group-item-action" href="/invite">Inviter quelqu'un</a> + {{end}} </div> </div> -<div class="card mt-3"> - <div class="card-header"> - Administration - </div> - <div class="list-group list-group-flush"> - <a class="list-group-item list-group-item-action" href="/admin/users">Utilisateurs</a> - <a class="list-group-item list-group-item-action" href="/admin/groups">Groupes</a> - <a class="list-group-item list-group-item-action" href="/admin/ldap">Explorateur LDAP</a> +{{if .CanAdmin}} + <div class="card mt-3"> + <div class="card-header"> + Administration + </div> + <div class="list-group list-group-flush"> + <a class="list-group-item list-group-item-action" href="/admin/users">Utilisateurs</a> + <a class="list-group-item list-group-item-action" href="/admin/groups">Groupes</a> + <a class="list-group-item list-group-item-action" href="/admin/ldap">Explorateur LDAP</a> + </div> </div> -</div> +{{end}} {{end}} |