Example #1
0
 function is_allow($s, $id = 0, $a = null)
 {
     if (!$this->with_acls()) {
         return true;
     }
     if (!isset($a)) {
         $a = acl_collection_abstract::DEFAULT_ACTION;
     }
     // if not loaded
     $this->get_acls();
     if (is_array($s)) {
         extract($s);
         if (!isset($id)) {
             $id = 0;
         }
         if (!isset($a)) {
             $a = acl_collection_abstract::DEFAULT_ACTION;
         }
     }
     if (empty($s)) {
         return false;
     }
     // admin owns all
     if ($this->level >= $this->container->get_level_by_name('admin')) {
         return true;
     }
     return $this->_acls->is_allow($s, $id, $a);
 }