mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-02 17:14:53 +02:00
Fix attribute mapping config fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
20757e9f0e
commit
00711b8fbb
|
@ -73,7 +73,14 @@ class SettingsController extends Controller {
|
|||
if (strpos($category, 'security-') === 0) {
|
||||
$category = 'security';
|
||||
}
|
||||
// make sure we properly fetch the attribute mapping
|
||||
// as this is the only category that has the saml- prefix on config keys
|
||||
if (strpos($category, 'attribute-mapping') === 0) {
|
||||
$category = 'attribute-mapping';
|
||||
$key = $prefix . 'saml-attribute-mapping' . '-' . $setting;
|
||||
} else {
|
||||
$key = $prefix . $category . '-' . $setting;
|
||||
}
|
||||
$settings[$category][$setting] = $this->config->getAppValue('user_saml', $key, '');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ class Admin implements ISettings {
|
|||
'security-required' => $securityRequiredFields,
|
||||
'security-general' => $securityGeneral,
|
||||
'general' => $generalSettings,
|
||||
'attributeMappings' => $attributeMappingSettings,
|
||||
'attribute-mapping' => $attributeMappingSettings,
|
||||
'type' => $type,
|
||||
'providers' => $providers
|
||||
];
|
||||
|
|
|
@ -120,7 +120,7 @@ style('user_saml', 'admin');
|
|||
</p>
|
||||
|
||||
<div class="hidden">
|
||||
<?php foreach($_['attributeMappings'] as $key => $attribute): ?>
|
||||
<?php foreach($_['attribute-mapping'] as $key => $attribute): ?>
|
||||
<?php
|
||||
if($attribute['type'] === 'line'): ?>
|
||||
<p>
|
||||
|
|
|
@ -137,7 +137,7 @@ class AdminTest extends \Test\TestCase {
|
|||
'security-required' => $securityRequiredFields,
|
||||
'security-general' => $securityGeneral,
|
||||
'general' => $generalSettings,
|
||||
'attributeMappings' => $attributeMappingSettings,
|
||||
'attribute-mapping' => $attributeMappingSettings,
|
||||
'providers' => [
|
||||
['id' => 1, 'name' => 'Provider 1'],
|
||||
['id' => 2, 'name' => 'Provider 2']
|
||||
|
|
Loading…
Reference in a new issue