API CHANGE Moved NZGovtPasswordValidator to new 'securityextras' module

This commit is contained in:
Ingo Schommer 2012-03-02 00:28:04 +01:00
parent 58ffbe84bc
commit 424da6abe1
3 changed files with 14 additions and 18 deletions

View File

@ -129,11 +129,11 @@ included through `translatable/_config.php`:
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');
### Moved Group->IPRestrictions into a new 'ipaddress-restriction' module
### Moved Group->IPRestrictions into a new 'securityextras' module
IP restrictions for group memberships in the "Security" section were a rarely used feature,
and cluttered up the interface. We've decided to move it to a separate module
called [ipaddress-restriction](http://github.com/silverstripe-labs/silverstripe-ipaddress-restriction).
called [securityextras](https://github.com/silverstripe-labs/silverstripe-securityextras).
To continue using these restrictions, just install the module - no data migration required.
### Removed "auto-merging" of member records from `Member->onBeforeWrite()`
@ -181,3 +181,4 @@ BreadcrumbsTemplate.ss from cms/template to your theme or application.
* `XML`: Use PHP's built-in SimpleXML instead
* `DataObjectLog`: There is no replacement for this.
* `GeoIP`: Moved to separate ["geoip" module](https://github.com/silverstripe-labs/silverstripe-geoip)
* `NZGovtPasswordValidator`: Moved to ["securityextras" module](https://github.com/silverstripe-labs/silverstripe-securityextras)

View File

@ -1,15 +0,0 @@
<?php
/**
* This {@link PasswordValidator} implements the NZ E-Government Guidelines for passwords
* @package sapphire
* @subpackage security
*/
class NZGovtPasswordValidator extends PasswordValidator {
function __construct() {
parent::__construct();
$this->minLength(7);
$this->checkHistoricalPasswords(6);
$this->characterStrength(3, array('lowercase','uppercase','digits','punctuation'));
}
}

View File

@ -179,7 +179,7 @@ class MemberTest extends FunctionalTest {
$member = $this->objFromFixture('Member', 'test');
$this->assertNotNull($member);
Member::set_password_validator(new NZGovtPasswordValidator());
Member::set_password_validator(new MemberTest_PasswordValidator());
// BAD PASSWORDS
@ -617,4 +617,14 @@ class MemberTest_EditingAllowedDeletingDeniedExtension extends DataExtension imp
return false;
}
}
class MemberTest_PasswordValidator extends PasswordValidator {
function __construct() {
parent::__construct();
$this->minLength(7);
$this->checkHistoricalPasswords(6);
$this->characterStrength(3, array('lowercase','uppercase','digits','punctuation'));
}
}