Esempio n. 1
0
 /**
  * given a permission string, check for access requirements
  *
  * @param string $str the permission to check
  *
  * @return boolean true if yes, else false
  * @static
  * @access public
  */
 static function check($str)
 {
     static $isAdmin = null;
     if ($isAdmin === null) {
         $session =& CRM_Core_Session::singleton();
         if ($session->get('new_install') == 1 && $session->get('goahead') == 'yes') {
             return true;
         }
     }
     require_once 'CRM/ACL/API.php';
     return $isAdmin ? true : CRM_ACL_API::check($str, null);
 }