final class ZoneAccessNotificationService (View source)

Emails a user when they gain or lose access to a zone.

This service handles email notifications when users are granted or revoked access to DNS zones, improving collaboration awareness and audit trails.

Methods

__construct(UserNotificationRecipientInterface $recipients, ConfigurationInterface $config, MailService $mailService, EmailTemplateService $emailTemplateService, DomainRepositoryInterface $domainRepository, UrlService $urlService, LoggerInterface|null $logger = null)

No description

bool
notifyAccessGranted(int $zoneId, int $newOwnerId, int $grantedById)

Send notification when zone access is granted to a user

bool
notifyAccessRevoked(int $zoneId, int $removedOwnerId, int $revokedById)

Send notification when zone access is revoked from a user

Details

__construct(UserNotificationRecipientInterface $recipients, ConfigurationInterface $config, MailService $mailService, EmailTemplateService $emailTemplateService, DomainRepositoryInterface $domainRepository, UrlService $urlService, LoggerInterface|null $logger = null)

No description

Parameters

UserNotificationRecipientInterface $recipients
ConfigurationInterface $config
MailService $mailService
EmailTemplateService $emailTemplateService
DomainRepositoryInterface $domainRepository
UrlService $urlService
LoggerInterface|null $logger

bool notifyAccessGranted(int $zoneId, int $newOwnerId, int $grantedById)

Send notification when zone access is granted to a user

Parameters

int $zoneId

Zone ID that access was granted to

int $newOwnerId

User ID of the new owner

int $grantedById

User ID of the person who granted access

Return Value

bool

True if notification was sent successfully

bool notifyAccessRevoked(int $zoneId, int $removedOwnerId, int $revokedById)

Send notification when zone access is revoked from a user

Parameters

int $zoneId

Zone ID that access was revoked from

int $removedOwnerId

User ID of the removed owner

int $revokedById

User ID of the person who revoked access

Return Value

bool

True if notification was sent successfully