diff options
-rw-r--r-- | CHANGELOG.md | 19 | ||||
-rw-r--r-- | Tests/Acl/Domain/ObjectIdentityTest.php | 20 | ||||
-rw-r--r-- | Tests/Core/Util/ClassUtilsTest.php | 4 |
3 files changed, 31 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a555f1e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +CHANGELOG +========= + +2.1.0 +----- + + * allow switching to the user that is already impersonated + * added support for the remember_me parameter in the query + * added AccessMapInterface + * [BC BREAK] moved user comparison logic out of UserInterface + * made the logout path check configurable + * after login, the user is now redirected to `default_target_path` if + `use_referer` is true and the referrer is the `login_path`. + * added a way to remove a token from a session + * [BC BREAK] changed `MutableAclInterface::setParentAcl` to accept `null`, + review your implementation to reflect this change. + * `ObjectIdentity::fromDomainObject`, `UserSecurityIdentity::fromAccount` and + `UserSecurityIdentity::fromToken` now return correct identities for proxies + objects (e.g. Doctrine proxies) diff --git a/Tests/Acl/Domain/ObjectIdentityTest.php b/Tests/Acl/Domain/ObjectIdentityTest.php index 20c74d5..7aa3cf2 100644 --- a/Tests/Acl/Domain/ObjectIdentityTest.php +++ b/Tests/Acl/Domain/ObjectIdentityTest.php @@ -12,13 +12,13 @@ namespace Symfony\Component\Security\Tests\Acl\Domain { use Symfony\Component\Security\Acl\Domain\ObjectIdentity; - + class ObjectIdentityTest extends \PHPUnit_Framework_TestCase { public function testConstructor() { $id = new ObjectIdentity('fooid', 'footype'); - + $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('footype', $id->getType()); } @@ -31,7 +31,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertEquals('fooid', $id->getIdentifier()); $this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType()); } - + public function testFromDomainObjectPrefersInterfaceOverGetId() { $domainObject = $this->getMock('Symfony\Component\Security\Acl\Model\DomainObjectInterface'); @@ -45,11 +45,11 @@ namespace Symfony\Component\Security\Tests\Acl\Domain ->method('getId') ->will($this->returnValue('getId()')) ; - + $id = ObjectIdentity::fromDomainObject($domainObject); $this->assertEquals('getObjectIdentifier()', $id->getIdentifier()); } - + public function testFromDomainObjectWithoutInterface() { $id = ObjectIdentity::fromDomainObject(new TestDomainObject()); @@ -63,7 +63,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertEquals('getId()', $id->getIdentifier()); $this->assertEquals('Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType()); } - + /** * @dataProvider getCompareData */ @@ -75,7 +75,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain $this->assertFalse($oid1->equals($oid2)); } } - + public function getCompareData() { return array( @@ -85,7 +85,7 @@ namespace Symfony\Component\Security\Tests\Acl\Domain array(new ObjectIdentity('1', 'bla'), new ObjectIdentity('1', 'blub'), false), ); } - + protected function setUp() { if (!class_exists('Doctrine\DBAL\DriverManager')) { @@ -93,14 +93,14 @@ namespace Symfony\Component\Security\Tests\Acl\Domain } } } - + class TestDomainObject { public function getObjectIdentifier() { return 'getObjectIdentifier()'; } - + public function getId() { return 'getId()'; diff --git a/Tests/Core/Util/ClassUtilsTest.php b/Tests/Core/Util/ClassUtilsTest.php index 7a6e698..16378a6 100644 --- a/Tests/Core/Util/ClassUtilsTest.php +++ b/Tests/Core/Util/ClassUtilsTest.php @@ -3,7 +3,7 @@ namespace Symfony\Component\Security\Tests\Core\Util { use Symfony\Component\Security\Core\Util\ClassUtils; - + class ClassUtilsTest extends \PHPUnit_Framework_TestCase { static public function dataGetClass() @@ -18,7 +18,7 @@ namespace Symfony\Component\Security\Tests\Core\Util array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Core\Util\TestObject(), 'Symfony\Component\Security\Tests\Core\Util\TestObject'), ); } - + /** * @dataProvider dataGetClass */ |