diff --git a/backend/pkg/http/middleware/auth.go b/backend/pkg/http/middleware/auth.go index 41146aca5..4ffc6e242 100644 --- a/backend/pkg/http/middleware/auth.go +++ b/backend/pkg/http/middleware/auth.go @@ -41,7 +41,13 @@ func setActor(c *gin.Context, a Actor, supportOf SupportOfFunc) bool { c.Set("support_access", a.Support) - ctx := authz.WithTenantID(c.Request.Context(), a.TenantID) + tid := a.TenantID + if tid == "" && !a.Internal { + // platform admin with no tenant selected → scope to the default + // tenant instead of "" (which downstream usecases fail-open on). + tid = authz.DefaultTenantID + } + ctx := authz.WithTenantID(c.Request.Context(), tid) if a.Internal && a.TenantID == "" { ctx = tenancy.WithAllTenantsRead(ctx) diff --git a/frontend/src/features/platform-broadcast/components/PlatformBroadcastButton.tsx b/frontend/src/features/platform-broadcast/components/PlatformBroadcastButton.tsx index 00e110ce8..09d5f3221 100644 --- a/frontend/src/features/platform-broadcast/components/PlatformBroadcastButton.tsx +++ b/frontend/src/features/platform-broadcast/components/PlatformBroadcastButton.tsx @@ -1,6 +1,7 @@ import { useState, type ReactNode } from 'react' import { Radio } from 'lucide-react' import { Button } from '@/shared/components/ui/button' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/shared/components/ui/tooltip' import { useAuth } from '@/features/auth/services/auth.context' import { useBilling } from '@/features/billing' import { useSupportTenant } from '@/shared/lib/current-tenant' @@ -48,15 +49,21 @@ export function PlatformBroadcastButton(props: PlatformBroadcastButtonProps) { return ( <> - + + + + + {props.label} +