59 lines
No EOL
1.5 KiB
HTML
59 lines
No EOL
1.5 KiB
HTML
{{ template "_base.html" . }}
|
|
{{ define "title" }}User{{ end }}
|
|
|
|
{{ define "header"}}
|
|
<p>
|
|
<a class="pure-button pure-button-primary" href="/user/">{{ .User.User }}</a>
|
|
</p>
|
|
<p>
|
|
<a class="pure-button pure-button-small" href="/user/logout/">Logout</a>
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
<div class="pure-u-1">
|
|
<p>
|
|
{{ if .User.Admin }}
|
|
You are an administrator.
|
|
{{ else }}
|
|
You are a regular user.
|
|
{{ end }}
|
|
{{ if .User.TOTPEnabled }}
|
|
You have TOTP enabled.
|
|
{{ else }}
|
|
You do not have TOTP enabled.
|
|
{{ end }}
|
|
</p>
|
|
<div class="pure-button-group" role="group" role="Actions">
|
|
<a class="pure-button" href="/user/password/">Change Password</a>
|
|
{{ if .User.TOTPEnabled }}
|
|
<a class="pure-button" href="/user/totp/disable/">Disable TOTP</a>
|
|
{{ else }}
|
|
<a class="pure-button" href="/user/totp/enable/">Enable TOTP</a>
|
|
{{ end }}
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
|
|
{{ if .User.Admin }}
|
|
<div class="pure-u-1">
|
|
{{ if (not .User.TOTPEnabled) }}
|
|
<div>
|
|
<p class="error-message">
|
|
TOTP is required to access these.
|
|
</p>
|
|
</div>
|
|
{{ end }}
|
|
<div class="pure-button-group" role="group" role="Actions">
|
|
<a class="pure-button" href="/admin/">Distillery Admin Page</a>
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="pure-u-1">
|
|
There will be a list of WissKIs you have access to here.
|
|
</div>
|
|
|
|
|
|
{{ end }} |