mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 00:18:27 +00:00
Allow team admins to view inherited policy details (#26896)
## Details Quick fix to an issue where when a team admin attempted to via an inherited policy, they would encounter an eternal spinner / flickering page. The issue stemmed from a reload cycle being set off by the stored policy being returned with a team ID of `null`, and existing code that works around the fact that the `useTeamId` hook modifies the router state. ## Testing 1. Create an All Teams policy on an instance with at least one team 2. Create an admin for the team 3. Log in as the team admin 4. Go to Policies page, select the team from the dropdown, click on the inherited policy in the list to view its details. On main, the details never load. On this branch, they do.
This commit is contained in:
parent
6e86b02bec
commit
20109fa7f8
1 changed files with 1 additions and 0 deletions
|
|
@ -213,6 +213,7 @@ const PolicyPage = ({
|
|||
!isOnGlobalTeam &&
|
||||
!isStoredPolicyLoading &&
|
||||
storedPolicy?.team_id !== undefined &&
|
||||
storedPolicy?.team_id !== null &&
|
||||
!(storedPolicy?.team_id?.toString() === location.query.team_id)
|
||||
) {
|
||||
router.push(
|
||||
|
|
|
|||
Loading…
Reference in a new issue