diff options
| author | Julian Hurst <ark@mansus.space> | 2023-01-25 01:23:58 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2023-01-25 01:23:58 +0100 |
| commit | f416775268085c7fb7f90cf54ea2149267b960e6 (patch) | |
| tree | d7e38e94795368f39cda882cd61c16b01eb56dd3 /templates/user.html | |
| parent | e7a3649280d20d9b4f68572721684a01049ec40f (diff) | |
| download | docspace-f416775268085c7fb7f90cf54ea2149267b960e6.tar.gz | |
Add user impersonation support for admins
Diffstat (limited to 'templates/user.html')
| -rw-r--r-- | templates/user.html | 12 |
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}} |
