summaryrefslogtreecommitdiff
path: root/tests/units/Model/AclTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-13 14:07:56 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-13 14:07:56 -0400
commita6a00a00400f164c4b18094999a5ed72366dd519 (patch)
tree7d2bfc3fe4a36649f9092463228f4553979aef94 /tests/units/Model/AclTest.php
parentc405f99fc8b7420b3e69c633b3259756a1ceb2f2 (diff)
First draft for plugins system
Diffstat (limited to 'tests/units/Model/AclTest.php')
-rw-r--r--tests/units/Model/AclTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/units/Model/AclTest.php b/tests/units/Model/AclTest.php
index fef03990..3cb28a77 100644
--- a/tests/units/Model/AclTest.php
+++ b/tests/units/Model/AclTest.php
@@ -290,4 +290,16 @@ class AclTest extends Base
$this->assertFalse($acl->isAllowed('task', 'remove', 1));
$this->assertTrue($acl->isAllowed('app', 'index', 1));
}
+
+ public function testExtend()
+ {
+ $acl = new Acl($this->container);
+
+ $this->assertFalse($acl->isProjectManagerAction('plop', 'show'));
+
+ $acl->extend('project_manager_acl', array('plop' => '*'));
+
+ $this->assertTrue($acl->isProjectManagerAction('plop', 'show'));
+ $this->assertTrue($acl->isProjectManagerAction('swimlane', 'index'));
+ }
}