@@ -108,6 +108,14 @@ const EntityListItem: ItemRenderer<Entity, EntityListItemProps> = ({
108108 selectedSchema
109109 ) . hasLint
110110
111+ const foreignTableHasLints : boolean = getEntityLintDetails (
112+ entity . name ,
113+ 'foreign_table_in_api' ,
114+ [ 'ERROR' , 'WARN' ] ,
115+ lints ,
116+ selectedSchema
117+ ) . hasLint
118+
111119 const formatTooltipText = ( entityType : string ) => {
112120 return Object . entries ( ENTITY_TYPE )
113121 . find ( ( [ , value ] ) => value === entityType ) ?. [ 0 ]
@@ -270,6 +278,7 @@ const EntityListItem: ItemRenderer<Entity, EntityListItemProps> = ({
270278 tableHasLints = { tableHasLints }
271279 viewHasLints = { viewHasLints }
272280 materializedViewHasLints = { materializedViewHasLints }
281+ foreignTableHasLints = { foreignTableHasLints }
273282 />
274283 </ div >
275284 </ div >
@@ -427,11 +436,13 @@ const EntityTooltipTrigger = ({
427436 tableHasLints,
428437 viewHasLints,
429438 materializedViewHasLints,
439+ foreignTableHasLints,
430440} : {
431441 entity : Entity
432442 tableHasLints : boolean
433443 viewHasLints : boolean
434444 materializedViewHasLints : boolean
445+ foreignTableHasLints : boolean
435446} ) => {
436447 let tooltipContent = ''
437448 const accessWarning = 'Data is publicly accessible via API'
@@ -453,7 +464,9 @@ const EntityTooltipTrigger = ({
453464 }
454465 break
455466 case ENTITY_TYPE . FOREIGN_TABLE :
456- tooltipContent = `${ accessWarning } as RLS via is not enforced on foreign tables`
467+ if ( foreignTableHasLints ) {
468+ tooltipContent = `${ accessWarning } as RLS is not enforced on foreign tables`
469+ }
457470 break
458471 default :
459472 break
0 commit comments