mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Made use of new BasicAuth::protect_entire_site() consistent.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91658 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ba69ce1d7e
commit
0bb067eddf
@ -54,10 +54,6 @@ if(defined('SS_ENVIRONMENT_FILE')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(defined('SS_USE_BASIC_AUTH') && SS_USE_BASIC_AUTH) {
|
|
||||||
BasicAuth::enable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(defined('SS_ENVIRONMENT_TYPE')) {
|
if(defined('SS_ENVIRONMENT_TYPE')) {
|
||||||
Director::set_environment_type(SS_ENVIRONMENT_TYPE);
|
Director::set_environment_type(SS_ENVIRONMENT_TYPE);
|
||||||
}
|
}
|
||||||
|
@ -634,7 +634,7 @@ class Email_Template extends Email {
|
|||||||
class Email_BounceHandler extends Controller {
|
class Email_BounceHandler extends Controller {
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
BasicAuth::disable();
|
BasicAuth::protect_entire_site(false);
|
||||||
parent::init();
|
parent::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class BasicAuth extends Object {
|
|||||||
* @deprecated Use BasicAuth::protect_entire_site() instead.
|
* @deprecated Use BasicAuth::protect_entire_site() instead.
|
||||||
*/
|
*/
|
||||||
static function enable() {
|
static function enable() {
|
||||||
user_error("BasicAuth::enable() is deprated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE);
|
user_error("BasicAuth::enable() is deprecated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE);
|
||||||
return self::protect_entire_site();
|
return self::protect_entire_site();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ class BasicAuth extends Object {
|
|||||||
* @deprecated Use BasicAuth::protect_entire_site(false) instead.
|
* @deprecated Use BasicAuth::protect_entire_site(false) instead.
|
||||||
*/
|
*/
|
||||||
static function disable() {
|
static function disable() {
|
||||||
user_error("BasicAuth::disable() is deprated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE);
|
user_error("BasicAuth::disable() is deprecated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE);
|
||||||
return self::protect_entire_site(false);
|
return self::protect_entire_site(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class WebserverRoutingTest extends SapphireTest {
|
|||||||
*/
|
*/
|
||||||
class WebserverRoutingTest_Controller extends Controller {
|
class WebserverRoutingTest_Controller extends Controller {
|
||||||
function index() {
|
function index() {
|
||||||
BasicAuth::disable();
|
BasicAuth::protect_entire_site(false);
|
||||||
|
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class RestfulServiceTest extends SapphireTest {
|
|||||||
class RestfulServiceTest_Controller extends Controller {
|
class RestfulServiceTest_Controller extends Controller {
|
||||||
public function index() {
|
public function index() {
|
||||||
ContentNegotiator::disable();
|
ContentNegotiator::disable();
|
||||||
BasicAuth::disable();
|
BasicAuth::protect_entire_site(false);
|
||||||
|
|
||||||
$request = '';
|
$request = '';
|
||||||
foreach ($this->request->requestVars() as $key=>$value) {
|
foreach ($this->request->requestVars() as $key=>$value) {
|
||||||
@ -126,7 +126,7 @@ XML;
|
|||||||
|
|
||||||
public function invalid() {
|
public function invalid() {
|
||||||
ContentNegotiator::disable();
|
ContentNegotiator::disable();
|
||||||
BasicAuth::disable();
|
BasicAuth::protect_entire_site(false);
|
||||||
$out = <<<XML
|
$out = <<<XML
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<test>
|
<test>
|
||||||
|
Loading…
Reference in New Issue
Block a user