From 224452be1cbaf311ba1200ad5ff404e2a09dfb8f Mon Sep 17 00:00:00 2001 From: Vladimir Kolesnikov Date: Sat, 28 Sep 2013 01:30:28 +0300 Subject: [PATCH] Regression test for #65 (cherry picked from commit 14b82c5ad05d6c65bd9306e5c5ff5b9c0286ed4f) --- ext/tests/issue-65.phpt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ext/tests/issue-65.phpt diff --git a/ext/tests/issue-65.phpt b/ext/tests/issue-65.phpt new file mode 100644 index 00000000000..60ade488098 --- /dev/null +++ b/ext/tests/issue-65.phpt @@ -0,0 +1,20 @@ +--TEST-- +Negating ACL roles - https://github.com/phalcon/cphalcon/issues/65 +--SKIPIF-- + +--FILE-- +setDefaultAction(\Phalcon\Acl::DENY); + +$acl->addRole('Guests'); +$acl->addRole('Members', 'Guests'); + +$acl->addResource('Login', array('index')); + +$acl->allow('Guests', 'Login', 'index'); +$acl->deny('Members', 'Login', 'index'); +var_dump((bool)$acl->isAllowed('Members', 'Login', 'index')); +?> +--EXPECT-- +bool(false)