mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Moved NZGovtPasswordValidator to new 'securityextras' module
This commit is contained in:
parent
58ffbe84bc
commit
424da6abe1
@ -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)
|
||||
|
@ -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'));
|
||||
}
|
||||
|
||||
}
|
@ -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'));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user