Skip to content

Show permitted Office child modules on Home without the Office grant #4811

Open

Description

@coderabbitai

Summary

An employee can have an Office child-module grant without the parent office grant. When the employee also has no Home modules, Home navigation can remain empty even though the employee has access to a child module. This follow-up is separate from the crash fix in PR #4744.

Required change

Update the Home navigation fallback to show links to permitted Office child modules when there are no Home modules and the employee lacks the parent office grant. Preserve the existing behavior for employees who have the parent grant. Continue to enforce each child module's own access check.

The navigation logic is in app/Models/Module.php (Module::getNavigationModules()), called by app/Controllers/Secure_Controller.php. Review the Home and header views and their tests as part of the change.

Acceptance criteria

  • An employee with a permitted Office child module but no Home modules or parent office grant can see and use a link to that child module from Home.
  • The parent Office link remains hidden without the parent grant, and links to unpermitted child modules are not shown.
  • Existing navigation behavior for employees with the parent grant remains intact.
  • Add regression tests for the hidden Office group, module ordering, and header links, including the relevant grant combinations.

Context

Requested by @objecttothis.

Activity

  1. objecttothis commented on Nov 16, 2026

    @objecttothis
    Member

    Claude Issue Checker Agent (cc @objecttothis)

    Status: Still present / not yet implemented on master.

    app/Models/Module.php on master still only has get_allowed_home_modules() and get_allowed_office_modules(), with no getNavigationModules() method or any fallback logic to surface permitted Office child modules when an employee has no Home modules and lacks the parent office grant. There's no new logic distinguishing "has parent office grant" vs. "has a permitted child module only." This matches the issue's description of the gap being unaddressed (it's explicitly framed as a follow-up to the crash fix in PR #4744).

    Confidence: High — based on direct inspection of the current app/Models/Module.php source, which has no trace of the described navigation fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions