aboutsummaryrefslogtreecommitdiff
path: root/templates/user.html
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-25 01:23:58 +0100
committerJulian Hurst <ark@mansus.space>2023-01-25 01:23:58 +0100
commitf416775268085c7fb7f90cf54ea2149267b960e6 (patch)
treed7e38e94795368f39cda882cd61c16b01eb56dd3 /templates/user.html
parente7a3649280d20d9b4f68572721684a01049ec40f (diff)
downloaddocspace-f416775268085c7fb7f90cf54ea2149267b960e6.tar.gz
Add user impersonation support for admins
Diffstat (limited to 'templates/user.html')
-rw-r--r--templates/user.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/user.html b/templates/user.html
index cd0d98c..9a3a333 100644
--- a/templates/user.html
+++ b/templates/user.html
@@ -5,11 +5,19 @@
{{if .Error}}
<p class="error">{{.Error}}</p>
{{end}}
+ {{if ne .UserImpersonation ""}}
+ <form action="/upload?user={{.UserImpersonation}}" method="POST" enctype="multipart/form-data">
+ {{else}}
<form action="/upload" method="POST" enctype="multipart/form-data">
+ {{end}}
<input type="file" name="files" multiple />
<input type="submit" value="Upload" />
</form>
+ {{if ne .UserImpersonation ""}}
+ <form action="/download?user={{.UserImpersonation}}" method="POST" class="inline">
+ {{else}}
<form action="/download" method="POST" class="inline">
+ {{end}}
<div class="docs">
<table>
<tr>
@@ -39,7 +47,11 @@
<br/>
<input type="submit" value="Télécharger les fichiers sélectionnés">
</form>
+ {{if ne .UserImpersonation ""}}
+ <form action="/download?user={{.UserImpersonation}}" method="GET" class="inlineblk">
+ {{else}}
<form action="/download" method="GET" class="inlineblk">
+ {{end}}
<input type="submit" value="Télécharger tous les fichiers">
</form>
{{end}}