diff --git a/artifacts/api-server/src/routes/executive-meetings.ts b/artifacts/api-server/src/routes/executive-meetings.ts index 198931cc..e65a6d63 100644 --- a/artifacts/api-server/src/routes/executive-meetings.ts +++ b/artifacts/api-server/src/routes/executive-meetings.ts @@ -2880,17 +2880,13 @@ const upsertFontSettingsHandler = async ( const userId = req.session.userId!; const data = parseBody(res, fontSettingsSchema, req.body); if (!data) return; - if (data.scope === "global") { - const names = await getRoleNamesForUser(userId); - const ok = EM_ADMIN_ROLES.some((r) => names.has(r)); - if (!ok) { - res.status(403).json({ error: "Forbidden", code: "forbidden" }); - return; - } - } - const targetUserId = data.scope === "global" ? null : userId; const userRoleNames = await getRoleNamesForUser(userId); const isAdmin = EM_ADMIN_ROLES.some((r) => userRoleNames.has(r)); + if (data.scope === "global" && !isAdmin) { + res.status(403).json({ error: "Forbidden", code: "forbidden" }); + return; + } + const targetUserId = data.scope === "global" ? null : userId; const logoSentByAdmin = isAdmin && data.logoObjectPath !== undefined; const logoForFontRow = diff --git a/attached_assets/image_1777877022157.png b/attached_assets/image_1777877022157.png new file mode 100644 index 00000000..6d95398e Binary files /dev/null and b/attached_assets/image_1777877022157.png differ