- `ctx.session.authenticatedIdentifier`
- `ctx.session.authenticatedProfile`
-If either of these are present, a navigation link is added to the page header allowing the user to log out.
-The link will point relatively to `/admin/logout`.
+If either of these are present, navigation links are added to the page header allowing the user to manage their account or log out.
+The links will point relatively to `/admin/settings` and `/admin/logout`, respectively.
- `ctx.url`
const logoutRedirect = ctx?.url ? `?r=${encodeURIComponent(ctx.url)}` : '';
const adminPath = (pagePathLevel > 0) ? `${'../'.repeat(pagePathLevel - 1)}` : 'admin/';
options.navLinks.push({
+ text: 'Account',
+ href: `${adminPath}settings`,
+ }, {
text: `Logout (${user})`,
href: `${adminPath}logout${logoutRedirect}`,
- }, {
- text: 'Settings',
- href: `${adminPath}settings`,
});
}