class ZoneAccessNotificationService (View source)

Service for sending zone access change notifications

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

Methods

__construct(PDO $db, ConfigurationManager $config, MailService $mailService, EmailTemplateService $emailTemplateService, ZoneRepositoryInterface $zoneRepository, 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(PDO $db, ConfigurationManager $config, MailService $mailService, EmailTemplateService $emailTemplateService, ZoneRepositoryInterface $zoneRepository, LoggerInterface|null $logger = null)

No description

Parameters

PDO $db
ConfigurationManager $config
MailService $mailService
EmailTemplateService $emailTemplateService
ZoneRepositoryInterface $zoneRepository
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