diff options
author | Andrea Lepori <aleporia@gmail.com> | 2023-07-24 12:53:03 +0200 |
---|---|---|
committer | Andrea Lepori <aleporia@gmail.com> | 2023-07-24 12:53:03 +0200 |
commit | 411c4035784b0294794b8bb34dce974f799e0757 (patch) | |
tree | e50829cdf1dc27e4a2c6fca3ed54c071c36e58cc /server/views.py | |
parent | add doc table link (diff) | |
download | scout-subs-411c4035784b0294794b8bb34dce974f799e0757.tar.gz scout-subs-411c4035784b0294794b8bb34dce974f799e0757.zip |
usercode with all personal data
Diffstat (limited to 'server/views.py')
-rw-r--r-- | server/views.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/views.py b/server/views.py index 141c9f7..4bcdf53 100644 --- a/server/views.py +++ b/server/views.py @@ -1826,6 +1826,18 @@ def docpreview(request): return render(request, 'server/download_doc.html', context)
+@staff_member_required
+@user_passes_test(lambda u: u.is_superuser)
+def debug_uc(request):
+ data = []
+ users = User.objects.all()
+ for u in users:
+ data.append([u, UserCode.objects.filter(user=u)])
+
+ context = {
+ "data": data,
+ }
+ return render(request, 'server/debug_usercode.html', context)
@user_passes_test(isStaff)
def data_request(request):
|