Esempio n. 1
0
 public function __construct(Lynx_Database $db, $name = NULL, $id = NULL)
 {
     parent::__construct($id, $name);
     $this->_db = $db;
 }
Esempio n. 2
0
 public function isAllowed($permission)
 {
     if (!$permission instanceof Lynx_Acl_Permission) {
         $permission = new Lynx_Acl_Permission($permission);
     }
     if ($this->_exempt) {
         return true;
     }
     foreach ($this->_roles as $role) {
         if (!empty($this->_hashTable[$role->getName()][$permission->getName()])) {
             return true;
         }
     }
     return false;
 }