diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-09 17:52:48 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-09 17:52:48 +0100 |
commit | edc75d18b792e19157107050abd35d832e46665a (patch) | |
tree | 9eebe988e589958a318121e68a6c59a0e76ed7af /templates/home.html | |
parent | 826a27854a758f9245411ac95622f947c9a069c7 (diff) | |
download | guichet-edc75d18b792e19157107050abd35d832e46665a.tar.gz guichet-edc75d18b792e19157107050abd35d832e46665a.zip |
Do not always show invite and admin links
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}} |