backport #28213 This PR will fix some missed checks for private repositories' data on web routes and API routes.
convert