Profile pictures from Gravatar or the identity provider, fetched and kept by the server

Both sources are off until switched on under Settings, Sign-in. The server asks only
gravatar.com (by a hash of the email) and the identity provider's own host, accepts only
small PNG/JPEG/WebP/GIF, keeps each picture for a day and serves it from /api/avatars/<id>,
so browsers never contact either. Shown in the user menu and on the Users page, with initials
as the fallback; the Privacy page says when it is on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-18 23:47:50 +02:00
1 parent 9782bd3252
commit c05c847d17
26 files changed
+4361 -21

No files matched your search

+2 -7
View File
@@ -16,6 +16,7 @@ import { useStackedTables } from "../hooks/useStackedTables";
import { useShortcuts } from "../hooks/useShortcuts";
import { useFormLabels } from "../hooks/useFormLabels";
import ShortcutHelp from "../components/ShortcutHelp";
import Avatar from "../components/Avatar";
import { useBreadcrumbTailValue } from "../utils/breadcrumb";
const RAIL_KEY = "hlm-sidebar-rail";
@@ -33,12 +34,6 @@ function useMediaQuery(query: string): boolean {
return matches;
}
/** Up to two initials for the little avatar in the user menu. */
function initialsOf(name: string): string {
const words = name.replace(/@.*$/, "").split(/[\s._-]+/).filter(Boolean);
return (words.length > 1 ? words[0][0] + words[1][0] : (words[0] ?? "?").slice(0, 2)).toUpperCase();
}
const OPEN_GROUPS_KEY = "hlm-nav-open-groups";
function loadOpenGroups(): Set<string> {
@@ -326,7 +321,7 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
title={user.email ?? undefined}
onClick={() => setMenuOpen((open) => !open)}
>
<span className="avatar avatar-sm">{initialsOf(user.name ?? user.email ?? user.sub)}</span>
<Avatar name={user.name ?? user.email ?? user.sub} src={user.avatarUrl} />
<span className="user-menu-who">
<span className="d-block text-truncate">{user.name ?? user.email ?? user.sub}</span>
<span className="d-block small opacity-75">{user.role}</span>