diff --git a/quotas.go b/quotas.go index e077ac8..3eec9b8 100644 --- a/quotas.go +++ b/quotas.go @@ -58,11 +58,11 @@ func entryToQuota(entry *ldap.Entry, field string) (int64, error) { func NewUserQuotaFromEntry(entry *ldap.Entry) *UserQuota { quotas := NewUserQuota() - if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_COUNT); err != nil { + if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_COUNT); err == nil { quotas.WebsiteCount = q } - if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_SIZE_BURSTED); err != nil { + if q, err := entryToQuota(entry, FIELD_QUOTA_WEBSITE_SIZE_BURSTED); err == nil { quotas.WebsiteSizeBursted = q } diff --git a/templates/garage_key.html b/templates/garage_key.html index b839fcb..e1a9019 100644 --- a/templates/garage_key.html +++ b/templates/garage_key.html @@ -21,12 +21,12 @@
Identifiant de clé | -{{ .Key.AccessKeyId }} | +Identifiant de clé | +{{ .S3KeyInfo.AccessKeyId }} | |||
---|---|---|---|---|---|---|
Clé secrète | -{{ .Key.SecretAccessKey }} | +Cliquer pour afficher la clé secrète | ||||
Région | @@ -58,12 +58,12 @@ -||||||
Nom d'utilisateur-ice | -{{ .Status.Info.Username }} | +{{ .Login.Info.Username }} | ||||
Mot de passe | @@ -207,7 +207,7 @@ hugo deployURLs | |||||
diff --git a/templates/home.html b/templates/home.html
index 241a59d..3dad6b6 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -2,7 +2,7 @@
{{define "body"}}
- Bienvenue, {{ .Login.WelcomeName }} !
+ Bienvenue, {{ .User.WelcomeName }} !
Se déconnecter
@@ -33,7 +33,7 @@
-{{if .Login.CanInvite}}
+{{if .User.Capabilities.CanInvite}}
Inviter des gens sur Deuxfleurs
@@ -45,7 +45,7 @@
{{end}}
-{{if .Login.CanAdmin}}
+{{if .User.Capabilities.CanAdmin}}
Administration
diff --git a/templates/profile.html b/templates/profile.html
index 56461eb..17965a6 100644
--- a/templates/profile.html
+++ b/templates/profile.html
@@ -20,7 +20,7 @@
-
+
|