/**
  * checks wether a user may invoke a command or not
  * (this method is called by ilAccessHandler::checkAccess)
  *
  * @param	string		$a_cmd		command (not permission!)
  * @param	string		$a_permission	permission
  * @param	int			$a_ref_id	reference id
  * @param	int			$a_obj_id	object id
  * @param	int			$a_user_id	user id (if not provided, current user is taken)
  *
  * @return	mixed		true, if everything is ok, message (string) when
  *						access is not granted
  */
 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = "")
 {
     global $ilUser, $lng, $rbacsystem, $ilAccess;
     if ($a_user_id == "") {
         $a_user_id = $ilUser->getId();
     }
     switch ($a_permission) {
         case "read":
             if (!ilObjGlossaryAccess::_lookupOnline($a_obj_id) && !$rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)) {
                 $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
                 return false;
             }
             break;
         case "visible":
             if (!ilObjGlossaryAccess::_lookupOnline($a_obj_id) && !$rbacsystem->checkAccessOfUser($a_user_id, 'write', $a_ref_id)) {
                 $ilAccess->addInfoItem(IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
                 return false;
             }
             break;
     }
     return true;
 }
 /**
  * Get item properties
  *
  * @return	array		array of property arrays:
  *						"alert" (boolean) => display as an alert property (usually in red)
  *						"property" (string) => property name
  *						"value" (string) => property value
  */
 function getProperties()
 {
     global $lng, $rbacsystem;
     $props = array();
     include_once "./Modules/Glossary/classes/class.ilObjGlossaryAccess.php";
     if (!ilObjGlossaryAccess::_lookupOnline($this->obj_id)) {
         $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline"));
     }
     return $props;
 }