Archived
Admins (with 2FA) can view the site as a non-admin user for up to 30 minutes, with a required reason and a "Viewing as" banner. It is strictly read-only: a guard mounted before every route refuses any write made with an impersonation token, protect/optionalAuth check the session is live, and GET handlers skip the price-refresh writes. Start, end, reason and every page/API call (including blocked attempts) are audited; optional email to the user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CP62L9JxHomA36aYP1ekCe
51 lines
2.6 KiB
TypeScript
51 lines
2.6 KiB
TypeScript
import React from "react";
|
|
import { Users, UserPlus, ShieldAlert, Eye } from "lucide-react";
|
|
import { GuideItem } from "@/components/shared/GuideItem";
|
|
import type { HelpContent } from "./types";
|
|
|
|
/** Help content for /dashboard/admin/users. */
|
|
export const dashboardAdminUsersHelpContent: HelpContent = {
|
|
title: "Managing users",
|
|
subtitle: "Create, edit, and manage accounts and roles.",
|
|
tabs: [
|
|
{
|
|
key: "overview",
|
|
label: "Overview",
|
|
icon: Users,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<p>Search by name, email, or phone, and filter by role or active status. Use "Create user" to add a new account with a name, email, password, phone, and role.</p>
|
|
<div className="space-y-4">
|
|
<GuideItem icon={UserPlus} title="Editing a user" tone="brand">
|
|
Click a row to open the edit modal — you can change name, email, role, phone, notification preference, active status, or set a new password.
|
|
</GuideItem>
|
|
</div>
|
|
</div>
|
|
),
|
|
},
|
|
{
|
|
key: "actions",
|
|
label: "Row actions",
|
|
icon: ShieldAlert,
|
|
content: (
|
|
<div className="space-y-4">
|
|
<div className="space-y-4">
|
|
<GuideItem icon={Eye} title="Impersonate" tone="violet">
|
|
See the site exactly as a user does, to help with a problem ("my ticket isn't showing"). Give a reason. A bright banner shows while you're viewing, for up to 30 minutes. It's strictly read-only: nothing can be registered, paid, changed or sent. The reason and every page you open are recorded in the audit log. You need two-factor authentication on, and admins can't be impersonated. Optionally, users get an email when this happens (Site Settings → Legal → Support access).
|
|
</GuideItem>
|
|
<GuideItem icon={Users} title="Sign out everywhere" tone="amber">
|
|
Revokes all of that user's active sessions — useful if a device was lost or access needs to be cut immediately.
|
|
</GuideItem>
|
|
<GuideItem icon={Users} title="Deactivate" tone="gray">
|
|
Soft-disables the account (they can't log in) without removing any data. Reversible at any time.
|
|
</GuideItem>
|
|
<GuideItem icon={ShieldAlert} title="Delete data" tone="rose">
|
|
Anonymises the user's name, email, and phone and deactivates the account. This cannot be undone — use it only for genuine data-removal requests, not as a quick way to disable someone.
|
|
</GuideItem>
|
|
</div>
|
|
</div>
|
|
),
|
|
},
|
|
],
|
|
};
|