Skip to content
Snippets Groups Projects
Commit aee52168 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add check for whether test user exists in config and add a separate column for that.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1172 44740490-163a-0410-bde0-09ae8108e29a
parent 48df8f66
No related branches found
No related tags found
No related merge requests found
...@@ -8,18 +8,18 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -8,18 +8,18 @@ $this->includeAtTemplateBase('includes/header.php');
<h2>LDAP test</h2> <h2>LDAP test</h2>
<table class="attributes" style="width: 100%; border: 1px solid #aaa"> <table class="attributes" style="font-size: small; width: 100%; border: 1px solid #aaa">
<tr> <tr>
<th>Name of institusion</th> <th>Name of institusion</th>
<!-- th>Identifier</th --> <th>Conf</th>
<th>Conf</th> <th>Meta</th>
<th>Meta</th> <th>Ping</th>
<th>Ping</th> <th>Admin bind()</th>
<th>Admin bind()</th> <th>Search bogus</th>
<th>Search bogus</th> <th>Search test</th>
<th>Search test</th> <th>test</th>
<th>Bind test</th> <th>Bind test</th>
<th>GetAttr test</th> <th>GetAttr</th>
</tr> </tr>
<?php <?php
...@@ -59,13 +59,13 @@ foreach($this->data['sortedOrgIndex'] as $orgkey) { ...@@ -59,13 +59,13 @@ foreach($this->data['sortedOrgIndex'] as $orgkey) {
} else { } else {
echo('<td><span style="color: #b4b4b4; font-size: x-small">NA</span> <tt>' . $orgkey . '</tt></td>'); echo('<td><span style="color: #b4b4b4; font-size: x-small">NA</span> <tt>' . $orgkey . '</tt></td>');
} }
# echo('<td><tt>' . htmlspecialchars($orgkey) . '</tt></td>');
showRes('config', $res, $this); showRes('config', $res, $this);
showRes('configMeta', $res, $this); showRes('configMeta', $res, $this);
showRes('ping', $res, $this); showRes('ping', $res, $this);
showRes('adminBind', $res, $this); showRes('adminBind', $res, $this);
showRes('ldapSearchBogus', $res, $this); showRes('ldapSearchBogus', $res, $this);
showRes('ldapSearchTestUser', $res, $this); showRes('ldapSearchTestUser', $res, $this);
showRes('configTest', $res, $this);
showRes('ldapBindTestUser', $res, $this); showRes('ldapBindTestUser', $res, $this);
showRes('ldapGetAttributesTestUser', $res, $this); showRes('ldapGetAttributesTestUser', $res, $this);
echo('</tr>'); echo('</tr>');
......
...@@ -59,7 +59,8 @@ foreach ($orgs AS $orgkey => $orgconfig) { ...@@ -59,7 +59,8 @@ foreach ($orgs AS $orgkey => $orgconfig) {
$results[$orgkey]['config'] = checkConfig($orgconfig, array('description', 'searchbase', 'hostname')); $results[$orgkey]['config'] = checkConfig($orgconfig, array('description', 'searchbase', 'hostname'));
$results[$orgkey]['configMeta'] = checkConfig($orgconfig, array('enable_tls', 'testUser', 'testPassword', 'contactMail', 'contactURL')); $results[$orgkey]['configMeta'] = checkConfig($orgconfig, array('enable_tls', 'contactMail', 'contactURL'));
$results[$orgkey]['configTest'] = checkConfig($orgconfig, array('testUser', 'testPassword'));
if (!$results[$orgkey]['config'][0]) continue; if (!$results[$orgkey]['config'][0]) continue;
...@@ -149,7 +150,7 @@ foreach ($orgs AS $orgkey => $orgconfig) { ...@@ -149,7 +150,7 @@ foreach ($orgs AS $orgkey => $orgconfig) {
function resultCode($res) { function resultCode($res) {
$code = ''; $code = '';
$columns = array('config', 'configMeta', 'ping', 'adminUser', 'ldapSearchBogus', 'ldapSearchTestUser', 'ldapBindTestUser', 'ldapGetAttributesTestUser'); $columns = array('config', 'configMeta', 'ping', 'adminUser', 'ldapSearchBogus', 'configTest', 'ldapSearchTestUser', 'ldapBindTestUser', 'ldapGetAttributesTestUser');
foreach ($columns AS $c) { foreach ($columns AS $c) {
if (array_key_exists($c, $res)) { if (array_key_exists($c, $res)) {
$code .= ($res[$c][0] ? '0' : '2'); $code .= ($res[$c][0] ? '0' : '2');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment