NavBar Menu
The application bar now supports an optional user menu that appears when clicking the user avatar. Previously, selecting the avatar opened the User Properties page directly. This enhancement allows environments to present richer navigation options, profile information, or conditional actions based on authentication method.
Enabling the User Menu
To enable the app-bar user menu, two settings must be enabled.
1. Feature Flag
PR40023_AddingConfigurableNavBarUserMenu This product feature flag must be enabled before any configuration settings will take effect.
If this flag is not enabled, the user menu will not appear regardless of configuration.
2. Web Configuration Setting
Located in Resources > Configuration > Web:
EnableNavBarUserMenu Type: Boolean Description: When set to true, clicking the avatar opens a drop-down menu. When set to false, the avatar continues to open the User Properties page directly.
This feature is optional and disabled by default to preserve legacy behaviour during upgrades.
Configuring User Menu Items
Menu items are defined in Resources > Configuration > Web > NavBarUserMenuItems. This parameter stores a JSON structure that determines:
- Which items appear in the menu
- Their labels, icons, and navigation targets
- Dynamic behaviour based on expression rules
Example configuration:
Default Menu Item Behaviour
User Profile Item
Displays the current user’s name, title, and avatar, and links to /users/me. Expression bindings (e.g. =//CurrentUser/Name) allow dynamic rendering based on the signed-in user.
Logout Item
Visibility is controlled by the =/CanLogout expression. This ensures the option only appears where logout is appropriate.
In SSO environments, users may not log in or out directly. When CanLogout evaluates to false, the Logout item is automatically hidden.
Customising Menu Items
Additional menu items can be added by extending the menuItems array. Supported configuration fields include:
Property | Description |
|---|---|
type | Type of item (typically "link"). |
label | Text label or expression. |
labelDescription | Optional secondary text. |
path | Navigation path or API endpoint. |
icon | Icon name or expression. |
enabled | Boolean or expression controlling visibility. |
Expressions can reference user attributes, permissions, or system values, enabling contextual menu behaviour.