Admin shortcut in the account menu, switched on per study user from /admin; v2.25.0
Publish Container / build (push) Has been cancelled
Publish Container / build (push) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
853e758bab
commit
d0741d628e
7 files changed
+40
-6
No files matched your search
@@ -6,6 +6,7 @@ interface AccountStatus {
|
||||
username: string
|
||||
displayName?: string
|
||||
avatarUrl?: string
|
||||
adminShortcut?: boolean
|
||||
}
|
||||
|
||||
// Shared across header instances so moving between pages doesn't flash the signed-out icon
|
||||
@@ -87,6 +88,9 @@ export function HeaderAccount() {
|
||||
<div className="header-account-menu" role="menu">
|
||||
<p className="header-account-name">Signed in as <strong>{name}</strong></p>
|
||||
<Link to="/study/account" role="menuitem" className="header-account-item" onClick={() => setOpen(false)}>My Account</Link>
|
||||
{status.adminShortcut && (
|
||||
<Link to="/admin" role="menuitem" className="header-account-item" onClick={() => setOpen(false)}>Admin</Link>
|
||||
)}
|
||||
<button type="button" role="menuitem" className="header-account-item" onClick={signOut}>Sign out</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user