mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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('SiteTree', 'Translatable');
|
||||||
Object::add_extension('SiteConfig', '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,
|
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
|
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.
|
To continue using these restrictions, just install the module - no data migration required.
|
||||||
|
|
||||||
### Removed "auto-merging" of member records from `Member->onBeforeWrite()`
|
### 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
|
* `XML`: Use PHP's built-in SimpleXML instead
|
||||||
* `DataObjectLog`: There is no replacement for this.
|
* `DataObjectLog`: There is no replacement for this.
|
||||||
* `GeoIP`: Moved to separate ["geoip" module](https://github.com/silverstripe-labs/silverstripe-geoip)
|
* `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');
|
$member = $this->objFromFixture('Member', 'test');
|
||||||
$this->assertNotNull($member);
|
$this->assertNotNull($member);
|
||||||
|
|
||||||
Member::set_password_validator(new NZGovtPasswordValidator());
|
Member::set_password_validator(new MemberTest_PasswordValidator());
|
||||||
|
|
||||||
// BAD PASSWORDS
|
// BAD PASSWORDS
|
||||||
|
|
||||||
@ -618,3 +618,13 @@ class MemberTest_EditingAllowedDeletingDeniedExtension extends DataExtension imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MemberTest_PasswordValidator extends PasswordValidator {
|
||||||
|
function __construct() {
|
||||||
|
parent::__construct();
|
||||||
|
$this->minLength(7);
|
||||||
|
$this->checkHistoricalPasswords(6);
|
||||||
|
$this->characterStrength(3, array('lowercase','uppercase','digits','punctuation'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user