Navigation Menu Access Fix
Version Implemented: 0.229.001
Issue Description
The navigation menu items for "My Groups" and "My Public Workspaces" in the user account dropdown were incorrectly restricted based on CREATE permissions rather than just feature enablement. This meant that users without the CreateGroups or CreatePublicWorkspaces roles could not access these pages from the navigation menu, even though they should be able to view groups and public workspaces they have access to.
Root Cause Analysis
The issue was in the navigation template conditionals:
Overly Restrictive Menu Logic: Both
_sidebar_nav.htmland_top_nav.htmlhad complex conditionals that checked for create permissions in addition to feature enablement.Inconsistent Access Logic: The navigation menus were using create permission checks while the actual pages (after our previous fixes) were properly allowing view access to all users.
User Experience Impact: Users without create permissions couldn't discover or access the "My Groups" and "My Public Workspaces" functionality through the normal navigation flow.
Technical Details
Files Modified
templates/_sidebar_nav.html- Simplified navigation conditionalstemplates/_top_nav.html- Simplified navigation conditionalsconfig.py- Updated version number
Logic Change Explanation
Before: Menu items were shown only if:
- Feature was enabled AND
- Either create permission requirement was disabled OR user had the create role
After: Menu items are shown if:
- Feature is enabled (regardless of create permissions)
This aligns with the principle that:
- Navigation visibility should depend on feature availability
- Create button visibility should depend on create permissions (handled within the pages)
- Page access should allow viewing for all users when features are enabled
Testing Approach
Created functional test test_navigation_menu_access_fix.py that validates:
- Sidebar navigation shows menu items based only on feature enablement
- Top navigation shows menu items based only on feature enablement
- Both navigation templates have consistent behavior
- No create permission checks remain in navigation conditionals
Impact Analysis
- User Experience: All users can now access "My Groups" and "My Public Workspaces" pages through normal navigation
- Feature Discovery: Users can discover these features even if they can't create new items
- Consistency: Navigation logic now matches page access logic
- Functionality: No loss of functionality - create restrictions still apply within the pages
Validation
- Before Fix: Users without create roles couldn't see navigation menu items
- After Fix: All users see navigation menu items when features are enabled
- Create Controls: Create buttons within pages are still properly restricted (from previous fixes)
Integration with Previous Fixes
This fix complements the previous fixes:
- Page Access: Routes now allow viewing for all users (previous fixes)
- Create Controls: Pages show create buttons only to authorized users (previous fixes)
- Navigation: Menu items now visible to all users (this fix)
This creates a complete and consistent user experience where:
- Users can navigate to features through the menu
- Users can view existing items they have access to
- Users can only create new items if they have the appropriate permissions
Configuration
The fix automatically respects existing admin settings:
- Group Workspaces: Menu item appears when
enable_group_workspacesis enabled - Public Workspaces: Menu item appears when
enable_public_workspacesis enabled - Create Permissions: Still enforced within the individual pages
User Flow Improvement
Before: User without create permissions → No menu items → Cannot discover features
After: User without create permissions → Can see menu items → Can access pages → Can view existing items → Cannot create new items (appropriate restriction)
This provides a much better user experience while maintaining security boundaries.