aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2024-01-29 16:16:07 +0100
committerAndrea Lepori <alepori@student.ethz.ch>2024-01-29 16:16:07 +0100
commitfe897631510748c877b3a78877ccccba6658ebe0 (patch)
tree1bb7d16218060492033a0d487abc626c870a5e9d /server/templates
parentuse usercode id instead of code (diff)
downloadscout-subs-fe897631510748c877b3a78877ccccba6658ebe0.tar.gz
scout-subs-fe897631510748c877b3a78877ccccba6658ebe0.zip
add impersonate buttondev
Diffstat (limited to '')
-rw-r--r--server/templates/server/user_list.html19
1 files changed, 13 insertions, 6 deletions
diff --git a/server/templates/server/user_list.html b/server/templates/server/user_list.html
index 95e205c..0a47428 100644
--- a/server/templates/server/user_list.html
+++ b/server/templates/server/user_list.html
@@ -49,12 +49,19 @@
<a onclick="send('d{{user.id}}')" class="modal-close waves-effect waves-green btn-flat">Rimuovi</a>
</div>
</div>
- <div class="hide-on-med-and-down">
- <a class="waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{user.id}}"><i class="material-icons left">remove_circle_outline</i>Rimuovi utente dalla branca</a>
- </div>
- <div style="margin-bottom: 0px;" class="hide-on-large-only row">
- <a class="col s12 waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{user.id}}"><i class="material-icons left">remove_circle_outline</i>Riumuovi utente dalla branca</a>
- </div>
+ <div class="hide-on-med-and-down">
+ <a class="waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{user.id}}"><i class="material-icons left">remove_circle_outline</i>Rimuovi utente dalla branca</a>
+ {% if request.user.is_superuser %}
+ <a class="waves-effect waves-light btn {{color}} modal-trigger" href="{% url 'impersonate-start' uid=user.user.id %}"><i class="material-icons left">transfer_within_a_station</i>Impersona utente</a>
+ {% endif %}
+ </div>
+ <div style="margin-bottom: 0px;" class="hide-on-large-only row">
+ <a class="col s12 waves-effect waves-light btn {{color}} modal-trigger" href="#modal{{user.id}}"><i class="material-icons left">remove_circle_outline</i>Riumuovi utente dalla branca</a>
+ {% if request.user.is_superuser %}
+ <br><br>
+ <a class="col s12 waves-effect waves-light btn {{color}} modal-trigger" href="{% url 'impersonate-start' uid=user.user.id %}"><i class="material-icons left">transfer_within_a_station</i>Impersona utente</a>
+ {% endif %}
+ </div>
<ul class="collection">
<li class="collection-item">
<i class="material-icons left">confirmation_number</i>U{{user.code}}