DNS Diagnostics - Allow for domain administrator

Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
This commit is contained in:
Kristián Feldsam 2018-01-16 00:06:01 +01:00
parent 9fa20e229c
commit 9f258df883

View File

@ -7,7 +7,7 @@ define('state_missing', '<span class="glyphicon glyphicon-remove text-danger"></
define('state_nomatch', "?"); define('state_nomatch', "?");
define('state_optional', " <sup>2</sup>"); define('state_optional', " <sup>2</sup>");
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") { if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "admin"|| $_SESSION['mailcow_cc_role'] == "domainadmin")) {
$domains = mailbox('get', 'domains'); $domains = mailbox('get', 'domains');
foreach(mailbox('get', 'domains') as $dn) { foreach(mailbox('get', 'domains') as $dn) {
@ -77,6 +77,8 @@ $spf_link = '<a href="http://www.openspf.org/SPF_Record_Syntax" target="_blank">
$dmarc_link = '<a href="http://www.kitterman.com/dmarc/assistant.html" target="_blank">DMARC Assistant</a>'; $dmarc_link = '<a href="http://www.kitterman.com/dmarc/assistant.html" target="_blank">DMARC Assistant</a>';
$records = array(); $records = array();
if($_SESSION['mailcow_cc_role'] == "admin")
{
$records[] = array( $records[] = array(
$mailcow_hostname, $mailcow_hostname,
'A', 'A',
@ -144,6 +146,7 @@ $records[] = array(
'TLSA', 'TLSA',
generate_tlsa_digest($autodiscover_config['sieve']['server'], $autodiscover_config['sieve']['port'], 1) generate_tlsa_digest($autodiscover_config['sieve']['server'], $autodiscover_config['sieve']['port'], 1)
); );
}
$records[] = array( $records[] = array(
$domain, $domain,
'MX', 'MX',