Skip to content

Commit 1a38ad3

Browse files
Merge branch '2.7' into 2.8
* 2.7: (70 commits) [travis] Use container-based infrastructure [HttpKernel] use ConfigCache::getPath() method when it exists [PropertyAccess] Fix setting public property on a class having a magic getter [Routing] Display file which contain deprecated option ContainerInterface: unused exception dropped bumped Symfony version to 2.6.8 updated VERSION for 2.6.7 updated CHANGELOG for 2.6.7 bumped Symfony version to 2.3.29 updated VERSION for 2.3.28 update CONTRIBUTORS for 2.3.28 updated CHANGELOG for 2.3.28 [Debug] Fixed ClassNotFoundFatalErrorHandlerTest [SecurityBundle] use access decision constants in config [SecurityBundle] use session auth constants in config PhpDoc fix in AbstractRememberMeServices [Filesystem] Simplified an if statement [SecurityBundle] Use Enum Nodes Instead Of Scalar [Debug 2.3] Fix test for PHP7 [HttpKernel] Check if "symfony/proxy-manager-bridge" package is installed ... Conflicts: src/Symfony/Bundle/DebugBundle/composer.json src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php src/Symfony/Component/Form/README.md src/Symfony/Component/Intl/README.md src/Symfony/Component/Security/README.md src/Symfony/Component/Translation/Loader/CsvFileLoader.php src/Symfony/Component/Translation/Loader/IniFileLoader.php src/Symfony/Component/Translation/Loader/MoFileLoader.php src/Symfony/Component/Translation/Loader/PhpFileLoader.php src/Symfony/Component/Translation/Loader/PoFileLoader.php src/Symfony/Component/Translation/Loader/YamlFileLoader.php src/Symfony/Component/Translation/README.md src/Symfony/Component/Translation/Translator.php src/Symfony/Component/Validator/README.md
2 parents 08ec55a + 456b3d7 commit 1a38ad3

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

DependencyInjection/MainConfiguration.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1717
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1818
use Symfony\Component\Config\Definition\ConfigurationInterface;
19+
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
1920

2021
/**
2122
* This class contains the configuration information.
@@ -60,14 +61,20 @@ public function getConfigTreeBuilder()
6061
$rootNode
6162
->children()
6263
->scalarNode('access_denied_url')->defaultNull()->example('/foo/error403')->end()
63-
->scalarNode('session_fixation_strategy')->cannotBeEmpty()->info('strategy can be: none, migrate, invalidate')->defaultValue('migrate')->end()
64+
->enumNode('session_fixation_strategy')
65+
->values(array(SessionAuthenticationStrategy::NONE, SessionAuthenticationStrategy::MIGRATE, SessionAuthenticationStrategy::INVALIDATE))
66+
->defaultValue(SessionAuthenticationStrategy::MIGRATE)
67+
->end()
6468
->booleanNode('hide_user_not_found')->defaultTrue()->end()
6569
->booleanNode('always_authenticate_before_granting')->defaultFalse()->end()
6670
->booleanNode('erase_credentials')->defaultTrue()->end()
6771
->arrayNode('access_decision_manager')
6872
->addDefaultsIfNotSet()
6973
->children()
70-
->scalarNode('strategy')->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE)->end()
74+
->enumNode('strategy')
75+
->values(array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, AccessDecisionManager::STRATEGY_CONSENSUS, AccessDecisionManager::STRATEGY_UNANIMOUS))
76+
->defaultValue(AccessDecisionManager::STRATEGY_AFFIRMATIVE)
77+
->end()
7178
->booleanNode('allow_if_all_abstain')->defaultFalse()->end()
7279
->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()
7380
->end()

Resources/views/Collector/security.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{% extends '@WebProfiler/Profiler/layout.html.twig' %}
22

33
{% block toolbar %}
4-
{% if collector.user %}
4+
{% if collector.tokenClass %}
55
{% set color_code = (collector.enabled and collector.authenticated) ? 'green' : 'yellow' %}
66
{% set authentication_color_code = (collector.enabled and collector.authenticated) ? 'green' : 'red' %}
77
{% set authentication_color_text = (collector.enabled and collector.authenticated) ? 'Yes' : 'No' %}
88
{% else %}
99
{% set color_code = collector.enabled ? 'red' : 'black' %}
1010
{% endif %}
1111
{% set text %}
12-
{% if collector.user %}
12+
{% if collector.tokenClass %}
1313
<div class="sf-toolbar-info-piece">
1414
<b>Logged in as</b>
1515
<span class="sf-toolbar-status sf-toolbar-status-{{ color_code }}">{{ collector.user }}</span>
@@ -47,7 +47,7 @@
4747

4848
{% block panel %}
4949
<h2>Security</h2>
50-
{% if collector.user %}
50+
{% if collector.tokenClass %}
5151
<table>
5252
<tr>
5353
<th>Username</th>

Tests/Functional/FirewallEntryPointTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials()
2222

2323
$client->request('GET', '/secure/resource', array(), array(), array(
2424
'PHP_AUTH_USER' => 'unknown',
25-
'PHP_AUTH_PW' => 'credentials',
25+
'PHP_AUTH_PW' => 'credentials',
2626
));
2727

2828
$this->assertEquals(

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "symfony-bundle",
44
"description": "Symfony SecurityBundle",
55
"keywords": [],
6-
"homepage": "http://symfony.com",
6+
"homepage": "https://symfony.com",
77
"license": "MIT",
88
"authors": [
99
{
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"name": "Symfony Community",
15-
"homepage": "http://symfony.com/contributors"
15+
"homepage": "https://symfony.com/contributors"
1616
}
1717
],
1818
"require": {

0 commit comments

Comments
 (0)