Skip to content

Commit 829102c

Browse files
fix[frontend](tenants): hide bulk operation on tenants button if no mssp license is present (#2499)
1 parent 4f1f7de commit 829102c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎frontend/src/features/platform-broadcast/components/PlatformBroadcastButton.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState, type ReactNode } from 'react'
22
import { Radio } from 'lucide-react'
33
import { Button } from '@/shared/components/ui/button'
44
import { useAuth } from '@/features/auth/services/auth.context'
5+
import { useBilling } from '@/features/billing'
56
import { useSupportTenant } from '@/shared/lib/current-tenant'
67
import type { BulkResult, BulkSelector } from '../services/broadcast-http.service'
78
import { BroadcastDialog } from './BroadcastDialog'
@@ -39,10 +40,11 @@ export interface PlatformBroadcastButtonProps {
3940
*/
4041
export function PlatformBroadcastButton(props: PlatformBroadcastButtonProps) {
4142
const { isPlatformAdmin } = useAuth()
43+
const { license } = useBilling()
4244
const supportTenant = useSupportTenant()
4345
const [open, setOpen] = useState(false)
4446

45-
if (!isPlatformAdmin || supportTenant !== null) return null
47+
if (!isPlatformAdmin || supportTenant !== null || license?.mssp !== true) return null
4648

4749
return (
4850
<>

0 commit comments

Comments
 (0)