mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-05 05:16:04 +02:00
238 lines
7.1 KiB
HTML
238 lines
7.1 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>
|
|
{{range .User.GetClaim "picture"}}
|
|
<img class="icon" src="{{.|safeURL}}" alt="user image" />
|
|
{{else}}
|
|
<img
|
|
class="icon"
|
|
src="{{dataURL "/.pomerium/assets/img/account_circle-24px.svg"}}"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
/>
|
|
{{end}}
|
|
</div>
|
|
|
|
<form method="GET" action="{{.SignOutURL}}">
|
|
<section>
|
|
<p class="message">Your current session details.</p>
|
|
<fieldset>
|
|
{{with .RedirectURL}}
|
|
<label>
|
|
<span>URL</span>
|
|
<a href="{{.}}">{{.}}</a>
|
|
</label>
|
|
{{end}}
|
|
{{with .User.Name}}
|
|
<label>
|
|
<span>Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{else}}
|
|
{{range .User.GetClaim "given_name"}}
|
|
<label>
|
|
<span>Given Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{range .User.GetClaim "family_name"}}
|
|
<label>
|
|
<span>Family Name</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{end}}
|
|
{{with .User.Id}}
|
|
<label>
|
|
<span>UserID</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{with .User.Email}}
|
|
<label>
|
|
<span>Email</span>
|
|
<input
|
|
type="email"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{range $i,$_:= .DirectoryGroups}}
|
|
<label>
|
|
{{if eq $i 0}}
|
|
<span>Group</span>
|
|
{{else}}
|
|
<span></span>
|
|
{{end}}
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.Name}}"
|
|
title="{{.Id}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{with .Session.IdToken}}
|
|
{{with .ExpiresAt}}
|
|
<label>
|
|
<span>Expires At</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.AsTime | formatTime}}"
|
|
title="{{.AsTime | formatTime}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{with .IssuedAt}}
|
|
<label>
|
|
<span>Issued At</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.AsTime | formatTime}}"
|
|
title="{{.AsTime | formatTime}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{with .State}}
|
|
{{with .ImpersonateEmail}}
|
|
<label>
|
|
<span>Impersonating Email</span>
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{range $i,$_:= .ImpersonateGroups}}
|
|
<label>
|
|
{{if eq $i 0}}
|
|
<span>Impersonating Group</span>
|
|
{{else}}
|
|
<span></span>
|
|
{{end}}
|
|
<input
|
|
type="text"
|
|
class="field"
|
|
value="{{.}}"
|
|
title="{{.}}"
|
|
disabled
|
|
/>
|
|
</label>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
</fieldset>
|
|
</section>
|
|
<div class="flex">
|
|
<button class="button full" type="submit">Sign Out</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{{if .EnableUserImpersonation}}
|
|
<div id="info-box">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2>Sign-in-as</h2>
|
|
<img
|
|
class="icon"
|
|
src="{{dataURL "/.pomerium/assets/img/supervised_user_circle-24px.svg"}}"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
/>
|
|
</div>
|
|
|
|
<form method="POST" action="/.pomerium/admin/impersonate">
|
|
<input type="hidden" value="{{.RedirectURL}}" name="pomerium_redirect_uri">
|
|
<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>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|