fix: expose staging admin entry
Deploy staging to test server / deploy (push) Successful in 3m11s

Use persisted self-hosted roles and the isolated admin origin so authorized staging accounts can discover the protected admin surface.
This commit is contained in:
linmeng
2026-07-29 10:14:39 +08:00
parent f7fd3e6a60
commit 2dac8bc47b
9 changed files with 100 additions and 19 deletions
+3 -2
View File
@@ -38,6 +38,7 @@ export type SidebarAccount = {
email: string;
credits: number;
isAdmin: boolean;
adminUrl: string | null;
initial: string;
};
@@ -214,8 +215,8 @@ export function AppSidebar({
<button className="account-menu-item" role="menuitem" type="button" onClick={() => handleAccountAction(onOpenRedeem)}>
<Gift aria-hidden="true" /><span></span><small>{account.credits} </small>
</button>
{account.isAdmin && <Link className="account-menu-item" href="/admin/codes" role="menuitem" onClick={() => onAccountMenuOpenChange(false)}>
<KeyRound aria-hidden="true" /><span></span><ChevronRight aria-hidden="true" />
{account.isAdmin && account.adminUrl && <Link className="account-menu-item" href={account.adminUrl} role="menuitem" onClick={() => onAccountMenuOpenChange(false)}>
<KeyRound aria-hidden="true" /><span></span><ChevronRight aria-hidden="true" />
</Link>}
<div className="account-menu-separator" role="separator" />
<button className="account-menu-item account-menu-danger" role="menuitem" type="button" onClick={() => handleAccountAction(onOpenLogout)}>