- public function testHasPermission()
- {
- $db = FroxlorPDO::getInstance();
- $db->query('TRUNCATE TABLE `acl_permissions`');
- FroxlorACL::addPermission('Froxlor', 'ACL', 'test.*');
- FroxlorACL::addPermission('Froxlor', 'ACL', 'test.x');
- /**
- * Only assign permissions to test.* to user 1
- * to see if this works
- */
- $db->query('TRUNCATE TABLE `acl_user_permissions`');
- $this->acl->grantUser('Froxlor.ACL.test.x');
- $permission = 'Froxlor.ACL.test.x';
- $result = $this->acl->hasPermission($permission);
- $this->assertTrue($result);
- }
Undefined
By: Guest | Date: May 26 2010 11:21 | Format: None | Expires: never | Size: 580 B | Hits: 835
Latest pastes
2 days ago
3 days ago
3 days ago
4 days ago
5 days ago