mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-07 14:26:01 +02:00
253 lines
7.8 KiB
HTML
253 lines
7.8 KiB
HTML
{{define "dashboard.html"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en" charset="utf-8">
|
|
<head>
|
|
<title>Pomerium</title>
|
|
{{template "header.html"}}
|
|
</head>
|
|
|
|
<body>
|
|
<div id="main">
|
|
<div id="info-box">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2>Current user</h2>
|
|
{{if .Session.Picture }}
|
|
<img class="icon" src="{{.Session.Picture}}" alt="user image" />
|
|
{{else}}
|
|
<img
|
|
class="icon"
|
|
src="/.pomerium/assets/img/account_circle-24px.svg"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
/>
|
|
{{end}}
|
|
</div>
|
|
|
|
<form method="POST" action="/.pomerium/sign_out">
|
|
<section>
|
|
<p class="message">Your current session details.</p>
|
|
<fieldset>
|
|
{{if .Session.Name}}
|
|
<label>
|
|
<span>Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.Name}}"
|
|
title="{{.Session.Name}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{else}} {{if .Session.GivenName}}
|
|
<label>
|
|
<span>Given Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.GivenName}}"
|
|
title="{{.Session.GivenName}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.FamilyName}}
|
|
<label>
|
|
<span>Family Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.FamilyName}}"
|
|
title="{{.Session.FamilyName}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{end}} {{if .Session.Subject}}
|
|
<label>
|
|
<span>UserID</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.Subject}}"
|
|
title="{{.Session.Subject}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.Email}}
|
|
<label>
|
|
<span>Email</span>
|
|
<input
|
|
type="email"
|
|
class="field"
|
|
value="{{.Session.Email}}"
|
|
title="{{.Session.Email}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.User}}
|
|
<label>
|
|
<span>User</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.User}}"
|
|
title="{{.Session.User}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{range $i,$_:= .Session.Groups}}
|
|
<label>
|
|
{{if eq $i 0}}
|
|
<span>Group</span>
|
|
{{else}}
|
|
<span></span>
|
|
{{end}}
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.Expiry}}
|
|
<label>
|
|
<span>Expiry</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.Expiry.Time}}"
|
|
title="{{.Session.Expiry.Time}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.IssuedAt}}
|
|
<label>
|
|
<span>Issued</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.IssuedAt.Time}}"
|
|
title="{{.Session.IssuedAt.Time}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.Issuer}}
|
|
<label>
|
|
<span>Issuer</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{ .Session.Issuer}}"
|
|
title="{{ .Session.Issuer}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{range $i, $_:= .Session.Audience}}
|
|
<label>
|
|
{{if eq $i 0}}
|
|
<span>Audience</span>
|
|
{{else}}
|
|
<span></span>
|
|
{{end}}
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
title="{{ . }}"
|
|
value="{{ . }}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{if .Session.ImpersonateEmail}}
|
|
<label>
|
|
<span>Impersonating Email</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Session.ImpersonateEmail}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}} {{range $i,$_:= .Session.ImpersonateGroups}}
|
|
<label>
|
|
{{if eq $i 0}}
|
|
<span>Impersonating Group</span>
|
|
{{else}}
|
|
<span></span>
|
|
{{end}}
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
</fieldset>
|
|
</section>
|
|
<div class="flex">
|
|
{{ .csrfField }}
|
|
<button class="button full" type="submit">Sign Out</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{if .IsAdmin}}
|
|
|
|
<div id="info-box">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2>Sign-in-as</h2>
|
|
<img
|
|
class="icon"
|
|
src="/.pomerium/assets/img/supervised_user_circle-24px.svg"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
/>
|
|
</div>
|
|
|
|
<form method="POST" action="/.pomerium/impersonate">
|
|
<section>
|
|
<p class="message">
|
|
Administrators can temporarily impersonate another user.
|
|
</p>
|
|
<fieldset>
|
|
<label>
|
|
<span>Email</span>
|
|
<input
|
|
name="{{ .ImpersonateEmail }}"
|
|
type="email"
|
|
class="field"
|
|
value=""
|
|
placeholder="user@example.com"
|
|
/>
|
|
</label>
|
|
<label>
|
|
<span>Group</span>
|
|
<input
|
|
name=" {{ .ImpersonateGroups }}"
|
|
type="text"
|
|
class="field"
|
|
value=""
|
|
placeholder="engineering"
|
|
/>
|
|
</label>
|
|
</fieldset>
|
|
</section>
|
|
<div class="flex">
|
|
{{ .csrfField }}
|
|
<button
|
|
name="{{ .ImpersonateAction }}"
|
|
value="set"
|
|
class="button full"
|
|
type="submit"
|
|
>
|
|
Impersonate
|
|
</button>
|
|
</div>
|
|
</form>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|