@@ -561,6 +561,22 @@ func TestPermissionResolver_Filtering(t *testing.T) {
561561 assert .NotContains (t , tenantGroups , "HA-group" , "traversal should not widen to HA-group" )
562562 })
563563
564+ t .Run ("partial-user tenant permissions children filtered" , func (t * testing.T ) {
565+ c := newPermTestClientFromConfig (cfg , "partial-user" )
566+ jj := postQuery (t , c , `{ tenants { name permissions { children { type name } } } }` , nil )
567+ for _ , tenant := range gjson .Get (jj , "tenants" ).Array () {
568+ if tenant .Get ("name" ).Str != "tl-tenant" {
569+ continue
570+ }
571+ childNames := names (tenant .Get ("permissions.children" ).Array (), "name" )
572+ assert .Contains (t , childNames , "CT-group" )
573+ assert .NotContains (t , childNames , "BA-group" , "permissions children should not include BA-group" )
574+ assert .NotContains (t , childNames , "HA-group" , "permissions children should not include HA-group" )
575+ return
576+ }
577+ t .Fatal ("tl-tenant not found" )
578+ })
579+
564580 t .Run ("partial-user group feeds" , func (t * testing.T ) {
565581 c := newPermTestClientFromConfig (cfg , "partial-user" )
566582 jj := postQuery (t , c , `{ groups { name feeds { onestop_id } } }` , nil )
0 commit comments