|
@@ -20,7 +20,7 @@ discard block |
|
|
block discarded – undo |
|
20
|
20
|
* <base_url>/copyright.php after deploying the software |
|
21
|
21
|
*/ |
|
22
|
22
|
|
|
23
|
|
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
|
23
|
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24
|
24
|
|
|
25
|
25
|
$auth = new \web\lib\admin\Authentication(); |
|
26
|
26
|
$loggerInstance = new \core\common\Logging(); |
|
@@ -33,15 +33,15 @@ discard block |
|
|
block discarded – undo |
|
33
|
33
|
$myInstOriginal = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
|
34
|
34
|
$instId = $myInstOriginal->identifier; |
|
35
|
35
|
|
|
36
|
|
-$hello = _("To whom it may concern,") . "\n\n"; |
|
37
|
|
-$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n" . |
|
38
|
|
- _("Greetings, ") . "\n\n" . |
|
|
36
|
+$hello = _("To whom it may concern,")."\n\n"; |
|
|
37
|
+$bye = _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n". |
|
|
38
|
+ _("Greetings, ")."\n\n". |
|
39
|
39
|
\config\Master::APPEARANCE['productname_long']; |
|
40
|
40
|
|
|
41
|
41
|
switch ($_POST['submitbutton']) { |
|
42
|
42
|
case web\lib\common\FormElements::BUTTON_DELETE: |
|
43
|
43
|
$myInstOriginal->destroy(); |
|
44
|
|
- $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP " . $instId); |
|
|
44
|
+ $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP ".$instId); |
|
45
|
45
|
header("Location: overview_user.php"); |
|
46
|
46
|
exit; |
|
47
|
47
|
case web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART: |
|
@@ -51,9 +51,9 @@ discard block |
|
|
block discarded – undo |
|
51
|
51
|
} |
|
52
|
52
|
// flush all IdP attributes and send user to creation wizard |
|
53
|
53
|
$myInstOriginal->flushAttributes(); |
|
54
|
|
- $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over" . $instId); |
|
55
|
|
- $text = $hello . |
|
56
|
|
- sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n" . |
|
|
54
|
+ $loggerInstance->writeAudit($_SESSION['user'], "DEL", "IdP starting over".$instId); |
|
|
55
|
+ $text = $hello. |
|
|
56
|
+ sprintf(_("the %s %s / %s / (previously known as) '%s' has deleted all properties and is starting over freshly. This means that its not recognisable by its name any more, and it may assume a different name in the future. You will get another mail if and when the name change happens."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n". |
|
57
|
57
|
$bye; |
|
58
|
58
|
$fed = new core\Federation($myInstOriginal->federation); |
|
59
|
59
|
foreach ($fed->listFederationAdmins() as $id) { |
|
@@ -72,19 +72,19 @@ discard block |
|
|
block discarded – undo |
|
72
|
72
|
exit(0); |
|
73
|
73
|
} |
|
74
|
74
|
$inst_name = $myInstOriginal->name; |
|
75
|
|
- echo "<h1>" . sprintf(_("Submitted attributes for IdP '%s'"), $inst_name) . "</h1>"; |
|
|
75
|
+ echo "<h1>".sprintf(_("Submitted attributes for IdP '%s'"), $inst_name)."</h1>"; |
|
76
|
76
|
echo "<table>"; |
|
77
|
77
|
echo $optionParser->processSubmittedFields($myInstOriginal, $_POST, $_FILES); |
|
78
|
78
|
echo "</table>"; |
|
79
|
79
|
// delete cached logo, if present |
|
80
|
|
- $dir = ROOT . '/web/downloads/logos/'; |
|
81
|
|
- $globResult = glob($dir . $myInstOriginal->identifier . "_*.png"); |
|
|
80
|
+ $dir = ROOT.'/web/downloads/logos/'; |
|
|
81
|
+ $globResult = glob($dir.$myInstOriginal->identifier."_*.png"); |
|
82
|
82
|
if ($globResult === FALSE) { // we should catch the improbable error condition |
|
83
|
83
|
$globResult = []; |
|
84
|
84
|
} |
|
85
|
85
|
array_map('unlink', $globResult); |
|
86
|
86
|
$loggerInstance->debug(4, "UNLINK from $dir\n"); |
|
87
|
|
- $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP " . $myInstOriginal->identifier . " - attributes changed"); |
|
|
87
|
+ $loggerInstance->writeAudit($_SESSION['user'], "MOD", "IdP ".$myInstOriginal->identifier." - attributes changed"); |
|
88
|
88
|
|
|
89
|
89
|
// re-instantiate ourselves... profiles need fresh data |
|
90
|
90
|
$myInstReinstantiated = $validator->existingIdP($_GET['inst_id'], $_SESSION['user']); |
|
@@ -93,10 +93,10 @@ discard block |
|
|
block discarded – undo |
|
93
|
93
|
if (count($significantChanges) > 0) { |
|
94
|
94
|
// send a notification/alert mail to someone we know is in charge |
|
95
|
95
|
/// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
|
96
|
|
- $text = $hello . sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
|
96
|
+ $text = $hello.sprintf(_("significant changes were made to the %s %s / %s / (previously known as) '%s'."), $ui->nomenclatureParticipant, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
97
|
97
|
if (isset($significantChanges[\core\IdP::INSTNAME_CHANGED])) { |
|
98
|
|
- $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureParticipant) . "\n\n"; |
|
99
|
|
- $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED] . "\n\n"; |
|
|
98
|
+ $text .= sprintf(_("The %s has changed its name. The details are below:"), $ui->nomenclatureParticipant)."\n\n"; |
|
|
99
|
+ $text .= $significantChanges[\core\IdP::INSTNAME_CHANGED]."\n\n"; |
|
100
|
100
|
} |
|
101
|
101
|
$text .= $bye; |
|
102
|
102
|
// (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
|
@@ -112,12 +112,12 @@ discard block |
|
|
block discarded – undo |
|
112
|
112
|
|
|
113
|
113
|
if (isset(\config\ConfAssistant::CONSORTIUM['ssid']) && count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
|
114
|
114
|
foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssidname) { |
|
115
|
|
- $ssids[] = $ssidname . " " . _("(WPA2/AES)"); |
|
|
115
|
+ $ssids[] = $ssidname." "._("(WPA2/AES)"); |
|
116
|
116
|
} |
|
117
|
117
|
} |
|
118
|
118
|
|
|
119
|
119
|
foreach ($myInstReinstantiated->getAttributes("media:SSID") as $ssidname) { |
|
120
|
|
- $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)"); |
|
|
120
|
+ $ssids[] = $ssidname['value']." "._("(WPA2/AES)"); |
|
121
|
121
|
} |
|
122
|
122
|
|
|
123
|
123
|
echo "<table>"; |
|
@@ -125,7 +125,7 @@ discard block |
|
|
block discarded – undo |
|
125
|
125
|
if (count($ssids) > 0) { |
|
126
|
126
|
$printedlist = ""; |
|
127
|
127
|
foreach ($ssids as $names) { |
|
128
|
|
- $printedlist = $printedlist . "$names "; |
|
|
128
|
+ $printedlist = $printedlist."$names "; |
|
129
|
129
|
} |
|
130
|
130
|
echo $uiElements->boxOkay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured")); |
|
131
|
131
|
} |
|
@@ -146,7 +146,7 @@ discard block |
|
|
block discarded – undo |
|
146
|
146
|
$myfed = new \core\Federation($myInstReinstantiated->federation); |
|
147
|
147
|
$allow_sb = $myfed->getAttributes("fed:silverbullet"); |
|
148
|
148
|
// only show IdP parts if fed has enabled hosted services && participant is an SP-type |
|
149
|
|
- if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" && count($allow_sb) > 0 && preg_match("/IdP/", $myInstReinstantiated->type) ) { |
|
|
149
|
+ if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL" && count($allow_sb) > 0 && preg_match("/IdP/", $myInstReinstantiated->type)) { |
|
150
|
150
|
// show the new profile jumpstart buttons only if we do not have any profile at all |
|
151
|
151
|
if (count($myInstReinstantiated->listProfiles()) == 0) { |
|
152
|
152
|
|
|
@@ -154,7 +154,7 @@ discard block |
|
|
block discarded – undo |
|
154
|
154
|
// did we get an email address? then, show the silverbullet jumpstart button |
|
155
|
155
|
// otherwise, issue a smartass comment |
|
156
|
156
|
if (count($myInstReinstantiated->getAttributes("support:email")) > 0) { |
|
157
|
|
- echo "<form method='post' action='edit_silverbullet.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME) . "</button></form>"; |
|
|
157
|
+ echo "<form method='post' action='edit_silverbullet.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>".sprintf(_("Continue to %s properties"), \core\ProfileSilverbullet::PRODUCTNAME)."</button></form>"; |
|
158
|
158
|
} else { |
|
159
|
159
|
echo "<table>"; |
|
160
|
160
|
echo $uiElements->boxError(sprintf(_("You did not submit an e-mail address. This is required for %s. Please go to the %s dashboard and edit your helpdesk settings to include a helpdesk e-mail address."), core\ProfileSilverbullet::PRODUCTNAME, $ui->nomenclatureParticipant), _("No support e-mail!")); |
|
@@ -162,11 +162,11 @@ discard block |
|
|
block discarded – undo |
|
162
|
162
|
} |
|
163
|
163
|
|
|
164
|
164
|
if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
165
|
|
- echo "<br/><form method='post' action='edit_profile.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . _("Continue to RADIUS/EAP profile definition") . "</button></form>"; |
|
|
165
|
+ echo "<br/><form method='post' action='edit_profile.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>"._("Continue to RADIUS/EAP profile definition")."</button></form>"; |
|
166
|
166
|
} |
|
167
|
167
|
} |
|
168
|
168
|
} |
|
169
|
|
- echo "<br/><form method='post' action='overview_org.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
|
169
|
+ echo "<br/><form method='post' action='overview_org.php?inst_id=$instId' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
170
|
170
|
|
|
171
|
171
|
break; |
|
172
|
172
|
default: |