Fleet versions
- Discovered: 4.85.0 (unreleased)
- Reproduced: 4.85.0
💥 Actual behavior
When a team observer opens an inherited (global) policy from the Policies list while viewing a team, the UI shows a 404 error page.
The frontend calls GET /api/latest/fleet/fleets/:fleet_id/policies/:policy_id (the team-scoped endpoint) for inherited policies. Inherited policies are global, so this returns 404 — they need to be fetched via the global endpoint instead.
🛠️ Expected behavior
Team observers can open inherited (global) policies from the team's Policies list and see the policy details page. The frontend should call the global policy endpoint (GET /api/latest/fleet/policies/:policy_id) when the policy is inherited, regardless of which team is currently selected.
🧑💻 Steps to reproduce
These steps:
- As an admin, create at least one global policy.
- Create a team and add a user with the Observer role on that team.
- Log in as the team observer.
- Navigate to Policies and select the team from the team dropdown.
- Click an inherited (global) policy in the list.
- Observe the 404 error page. The network tab shows a request to
/api/latest/fleet/fleets/:fleet_id/policies/:policy_id returning 404.
🕯️ More info (optional)
The team-scoped endpoint (/api/latest/fleet/fleets/:fleet_id/policies/:policy_id) does not resolve global policies; the global endpoint (/api/latest/fleet/policies/:policy_id) should be used for inherited entries in the team's policy list.
Fleet versions
💥 Actual behavior
When a team observer opens an inherited (global) policy from the Policies list while viewing a team, the UI shows a 404 error page.
The frontend calls
GET /api/latest/fleet/fleets/:fleet_id/policies/:policy_id(the team-scoped endpoint) for inherited policies. Inherited policies are global, so this returns 404 — they need to be fetched via the global endpoint instead.🛠️ Expected behavior
Team observers can open inherited (global) policies from the team's Policies list and see the policy details page. The frontend should call the global policy endpoint (
GET /api/latest/fleet/policies/:policy_id) when the policy is inherited, regardless of which team is currently selected.🧑💻 Steps to reproduce
These steps:
/api/latest/fleet/fleets/:fleet_id/policies/:policy_idreturning 404.🕯️ More info (optional)
The team-scoped endpoint (
/api/latest/fleet/fleets/:fleet_id/policies/:policy_id) does not resolve global policies; the global endpoint (/api/latest/fleet/policies/:policy_id) should be used for inherited entries in the team's policy list.