class ZoneOverlapService (View source)

Blocks creating a zone that overlaps an existing zone owned by another user.

The most-specific zone wins in PowerDNS, so an overlapping zone shadows the other owner's data. Covers forward and reverse zones.

Methods

__construct(DomainRepositoryInterface $zones, ConfigurationInterface $config, PermissionService $permissionService)

No description

string|null
findConflictingZone(string $zoneName, int $userId)

Return the existing zone (owned by another user) that the new zone would overlap as parent or child, or null when creation is allowed. Gated on dns.parent_zone_ownership_check; ueberusers are exempt. Ownership is evaluated for the acting user - the potential overrider.

Details

__construct(DomainRepositoryInterface $zones, ConfigurationInterface $config, PermissionService $permissionService)

No description

Parameters

DomainRepositoryInterface $zones
ConfigurationInterface $config
PermissionService $permissionService

string|null findConflictingZone(string $zoneName, int $userId)

Return the existing zone (owned by another user) that the new zone would overlap as parent or child, or null when creation is allowed. Gated on dns.parent_zone_ownership_check; ueberusers are exempt. Ownership is evaluated for the acting user - the potential overrider.

Parameters

string $zoneName
int $userId

Return Value

string|null