- 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: 837
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago