fixes
This commit is contained in:
@@ -77,13 +77,22 @@
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-slate-800">{{ user.case_email }}</td>
|
||||
<td class="px-4 py-3 text-sm text-slate-800">
|
||||
<form method="POST" action="/admin/users/{{ user.uid }}/reset-password" style="display: inline;">
|
||||
<button type="submit"
|
||||
class="text-blue-600 hover:text-blue-800 text-sm font-medium underline"
|
||||
onclick="return confirm('Are you sure you want to reset the password for {{ user.user_email }}? This will send a password reset email to their account.')">
|
||||
Reset Password
|
||||
</button>
|
||||
</form>
|
||||
<div class="flex flex-col space-y-1">
|
||||
<form method="POST" action="/admin/users/{{ user.uid }}/become-user" style="display: inline;">
|
||||
<button type="submit"
|
||||
class="text-green-600 hover:text-green-800 text-sm font-medium underline"
|
||||
onclick="return confirm('Are you sure you want to view as {{ user.user_email }}? This will replace your current session.')">
|
||||
Become User
|
||||
</button>
|
||||
</form>
|
||||
<form method="POST" action="/admin/users/{{ user.uid }}/reset-password" style="display: inline;">
|
||||
<button type="submit"
|
||||
class="text-blue-600 hover:text-blue-800 text-sm font-medium underline"
|
||||
onclick="return confirm('Are you sure you want to reset the password for {{ user.user_email }}? This will send a password reset email to their account.')">
|
||||
Reset Password
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
<a href="/" class="font-semibold">Rothbard Law Group - Cases</a>
|
||||
<nav class="space-x-4">
|
||||
{% if session.uid %}
|
||||
{% if session.impersonating %}
|
||||
<a href="/admin/users/revert" class="text-sm text-orange-600 hover:text-orange-900 font-medium">Revert to Admin</a>
|
||||
{% else %}
|
||||
<a href="/dashboard" class="text-sm text-slate-600 hover:text-slate-900">Dashboard</a>
|
||||
{% set profile = get_user_profile(session.uid) %}
|
||||
{% if profile.is_admin %}
|
||||
<a href="/admin/users" class="text-sm text-slate-600 hover:text-slate-900">Admin Users</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="/logout" class="text-sm text-slate-600 hover:text-slate-900">Logout</a>
|
||||
{% else %}
|
||||
<a href="/login" class="text-sm text-slate-600 hover:text-slate-900">Login</a>
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<div class="h-full flex flex-col" x-data="columnConfig()">
|
||||
{% if session.impersonating %}
|
||||
{% set impersonated_profile = get_user_profile(session.uid) %}
|
||||
<div class="bg-orange-50 border border-orange-200 text-orange-800 px-4 py-3 rounded-md mb-4 flex justify-between items-center">
|
||||
<div>
|
||||
<p class="font-medium">Viewing as: {{ impersonated_profile.user_email }}</p>
|
||||
<p class="text-sm mt-1">You are impersonating this user. Click "Revert to Admin" in the navigation to return to your admin account.</p>
|
||||
</div>
|
||||
<a href="/admin/users/revert" class="inline-flex items-center px-3 py-1.5 text-sm font-medium text-orange-700 bg-orange-100 hover:bg-orange-200 rounded-md transition-colors">
|
||||
Revert to Admin
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if case_email %}
|
||||
<h1 class="text-xl font-semibold mb-4">Projects for {{ case_email }}</h1>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user