mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Fix #1245 : Rename trials-before-failure configuration to trials-before-display
This commit is contained in:
@@ -86,7 +86,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -101,7 +101,7 @@ class AuthenticationManagerServiceProvider implements ServiceProviderInterface
|
|||||||
$app['auth.native.failure-manager'] = $app->share(function (Application $app) {
|
$app['auth.native.failure-manager'] = $app->share(function (Application $app) {
|
||||||
$authConf = $app['phraseanet.configuration']['authentication']['captcha'];
|
$authConf = $app['phraseanet.configuration']['authentication']['captcha'];
|
||||||
|
|
||||||
return new FailureManager($app['EM'], $app['recaptcha'], isset($authConf['trials-before-failure']) ? $authConf['trials-before-failure'] : 9);
|
return new FailureManager($app['EM'], $app['recaptcha'], isset($authConf['trials-before-display']) ? $authConf['trials-before-display'] : 9);
|
||||||
});
|
});
|
||||||
|
|
||||||
$app['auth.password-checker'] = $app->share(function (Application $app) {
|
$app['auth.password-checker'] = $app->share(function (Application $app) {
|
||||||
|
@@ -18,7 +18,7 @@ namespace Alchemy\Phrasea\Core;
|
|||||||
*/
|
*/
|
||||||
class Version
|
class Version
|
||||||
{
|
{
|
||||||
protected static $number = '3.8.0.a16';
|
protected static $number = '3.8.0.a17';
|
||||||
protected static $name = 'Carnosaurus';
|
protected static $name = 'Carnosaurus';
|
||||||
|
|
||||||
public static function getNumber()
|
public static function getNumber()
|
||||||
|
66
lib/classes/patch/3817.php
Normal file
66
lib/classes/patch/3817.php
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2012 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Application;
|
||||||
|
|
||||||
|
class patch_3817 implements patchInterface
|
||||||
|
{
|
||||||
|
/** @var string */
|
||||||
|
private $release = '3.8.0.a17';
|
||||||
|
|
||||||
|
/** @var array */
|
||||||
|
private $concern = array(base::APPLICATION_BOX);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_release()
|
||||||
|
{
|
||||||
|
return $this->release;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function require_all_upgrades()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function concern()
|
||||||
|
{
|
||||||
|
return $this->concern;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function apply(base $appbox, Application $app)
|
||||||
|
{
|
||||||
|
$auth = $app['phraseanet.configuration']['authentication'];
|
||||||
|
|
||||||
|
if (!isset($auth['captcha'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($auth['captcha']['trials-before-failure'])) {
|
||||||
|
$auth['captcha']['trials-before-display'] = $auth['captcha']['trials-before-failure'];
|
||||||
|
unset($auth['captcha']['trials-before-failure']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$app['phraseanet.configuration']['authentication'] = $auth;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@@ -89,7 +89,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -72,7 +72,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -72,7 +72,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -97,7 +97,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -97,7 +97,7 @@ authentication:
|
|||||||
templates: { }
|
templates: { }
|
||||||
captcha:
|
captcha:
|
||||||
enabled: true
|
enabled: true
|
||||||
trials-before-failure: 9
|
trials-before-display: 9
|
||||||
providers:
|
providers:
|
||||||
facebook:
|
facebook:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@@ -88,7 +88,7 @@ class AuthenticationManagerServiceProvidertest extends ServiceProviderTestCase
|
|||||||
$app->register(new ConfigurationServiceProvider());
|
$app->register(new ConfigurationServiceProvider());
|
||||||
|
|
||||||
$app['phraseanet.configuration'] = $conf = $app['phraseanet.configuration']->getConfig();
|
$app['phraseanet.configuration'] = $conf = $app['phraseanet.configuration']->getConfig();
|
||||||
$conf['authentication']['captcha']['trials-before-failure'] = 42;
|
$conf['authentication']['captcha']['trials-before-display'] = 42;
|
||||||
$app['phraseanet.configuration'] = $conf;
|
$app['phraseanet.configuration'] = $conf;
|
||||||
|
|
||||||
$app['EM'] = $this->getMockBuilder('Doctrine\Orm\EntityManager')
|
$app['EM'] = $this->getMockBuilder('Doctrine\Orm\EntityManager')
|
||||||
|
@@ -208,7 +208,7 @@ class Migration38Test extends AbstractSetupTester
|
|||||||
),
|
),
|
||||||
'captcha' => array(
|
'captcha' => array(
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'trials-before-failure' => 9,
|
'trials-before-display' => 9,
|
||||||
),
|
),
|
||||||
'providers' => array(
|
'providers' => array(
|
||||||
'facebook' => array(
|
'facebook' => array(
|
||||||
|
Reference in New Issue
Block a user