ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilAccessHandler.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once("Services/AccessControl/classes/class.ilAccessInfo.php");
5 
21 {
25  function ilAccessHandler()
26  {
27  global $rbacsystem,$lng;
28 
29  $this->rbacsystem =& $rbacsystem;
30  $this->results = array();
31  $this->current_info = new ilAccessInfo();
32 
33  // use function enable to switch on/off tests (only cache is used so far)
34  $this->cache = true;
35  $this->rbac = true;
36  $this->tree = true;
37  $this->condition = true;
38  $this->path = true;
39  $this->status = true;
40  $this->obj_id_cache = array();
41  $this->obj_type_cache = array();
42  $this->obj_tree_cache=array();
43  }
44 
55  function storeAccessResult($a_permission, $a_cmd, $a_ref_id, $a_access_granted, $a_user_id = "",$a_info = "")
56  {
57  global $ilUser;
58 
59  if ($a_user_id == "")
60  {
61  $a_user_id = $ilUser->getId();
62  }
63 
64  if ($a_info == "")
65  {
66  $a_info = $this->current_info;
67  }
68 
69  //var_dump("<pre>",$a_permission,"</pre>");
70 
71  if ($this->cache)
72  {
73  $this->results[$a_ref_id][$a_permission][$a_cmd][$a_user_id] =
74  array("granted" => $a_access_granted, "info" => $a_info,
75  "prevent_db_cache" => $this->getPreventCachingLastResult());
76 //echo "<br>write-$a_ref_id-$a_permission-$a_cmd-$a_user_id-$a_access_granted-";
77  $this->current_result_element = array($a_access_granted,$a_ref_id,$a_permission,$a_cmd,$a_user_id);
78  $this->last_result = $this->results[$a_ref_id][$a_permission][$a_cmd][$a_user_id];
79  $this->last_info = $a_info;
80  }
81 
82  // get new info object
83  $this->current_info = new ilAccessInfo();
84 
85  }
86 
92  function setPreventCachingLastResult($a_val)
93  {
94  $this->prevent_caching_last_result = $a_val;
95  }
96 
103  {
104  return $this->prevent_caching_last_result;
105  }
106 
119  function getStoredAccessResult($a_permission, $a_cmd, $a_ref_id, $a_user_id = "")
120  {
121  global $ilUser;
122 
123  if ($a_user_id == "")
124  {
125  $a_user_id = $ilUser->getId();
126  }
127 
128  /*if (is_object($this->results[$a_ref_id][$a_permission][$a_cmd][$a_user_id]['info']))
129  {
130  $this->current_info = $this->results[$a_ref_id][$a_permission][$a_cmd][$a_user_id]['info'];
131  }*/
132 
133  return $this->results[$a_ref_id][$a_permission][$a_cmd][$a_user_id];
134  }
135 
136  function storeCache()
137  {
138  global $ilDB, $ilUser;
139 
140  $query = "DELETE FROM acc_cache WHERE user_id = ".$ilDB->quote($ilUser->getId(),'integer');
141  $res = $ilDB->manipulate($query);
142 
143  $ilDB->insert('acc_cache', array(
144  'user_id' => array('integer',$ilUser->getId()),
145  'time' => array('integer',time()),
146  'result' => array('clob',serialize($this->results))
147  ));
148  }
149 
150  function readCache($a_secs = 0)
151  {
152  global $ilUser, $ilDB;
153 
154  if ($a_secs > 0)
155  {
156  $query = "SELECT * FROM acc_cache WHERE user_id = ".
157  $ilDB->quote($ilUser->getId() ,'integer');
158  $set = $ilDB->query($query);
159  $rec = $set->fetchRow(DB_FETCHMODE_ASSOC);
160  if ((time() - $rec["time"]) < $a_secs)
161  {
162  $this->results = unserialize($rec["result"]);
163 //var_dump($this->results);
164  return true;
165  }
166  }
167  return false;
168  }
169 
170  function getResults()
171  {
172  return $this->results;
173  }
174 
175  function setResults($a_results)
176  {
177  $this->results = $a_results;
178  }
179 
183  function addInfoItem($a_type, $a_text, $a_data = "")
184  {
185  $this->current_info->addInfoItem($a_type, $a_text, $a_data);
186  }
187 
200  function checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type = "", $a_obj_id = "", $a_tree_id="")
201  {
202  global $ilUser;
203 
204  return $this->checkAccessOfUser($ilUser->getId(),$a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id, $a_tree_id);
205  }
206 
220  function checkAccessOfUser($a_user_id,$a_permission, $a_cmd, $a_ref_id, $a_type = "", $a_obj_id = "", $a_tree_id="")
221  {
222  global $ilBench, $lng;
223 
224  $this->setPreventCachingLastResult(false); // for external db based caches
225 
226  $ilBench->start("AccessControl", "0400_clear_info");
227  $this->current_info->clear();
228  $ilBench->stop("AccessControl", "0400_clear_info");
229 
230 
231  // get stored result (internal memory based cache)
232  $cached = $this->doCacheCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id);
233  if ($cached["hit"])
234  {
235  // Store access result
236  if (!$cached["granted"])
237  {
238  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
239  }
240  if ($cached["prevent_db_cache"])
241  {
242  $this->setPreventCachingLastResult(true); // should have been saved in previous call already
243  }
244  return $cached["granted"];
245  }
246 
247  $ilBench->start("AccessControl", "0500_lookup_id_and_type");
248  // get object id if not provided
249  if ($a_obj_id == "")
250  {
251  if ($this->obj_id_cache[$a_ref_id] > 0)
252  {
253  $a_obj_id = $this->obj_id_cache[$a_ref_id];
254  }
255  else
256  {
257  $a_obj_id = ilObject::_lookupObjId($a_ref_id);
258  $this->obj_id_cache[$a_ref_id] = $a_obj_id;
259  }
260  }
261  if ($a_type == "")
262  {
263  if ($this->obj_type_cache[$a_ref_id] != "")
264  {
265  $a_type = $this->obj_type_cache[$a_ref_id];
266  }
267  else
268  {
269  $a_type = ilObject::_lookupType($a_ref_id, true);
270  $this->obj_type_cache[$a_ref_id] = $a_type;
271  }
272  }
273 
274  $ilBench->stop("AccessControl", "0500_lookup_id_and_type");
275 
276  // to do: payment handling
277 
278  // if supplied tree id is not = 1 (= repository main tree),
279  // check if object is in tree and not deleted
280  if ($a_tree_id != 1 &&
281  !$this->doTreeCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id))
282  {
283  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
284  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
285  return false;
286  }
287 
288  // rbac check for current object
289  if (!$this->doRBACCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_type))
290  {
291  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
292  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
293  return false;
294  }
295 
296  // check read permission for all parents
297  $par_check = $this->doPathCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id);
298  if (!$par_check)
299  {
300 
301  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
302  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
303  return false;
304  }
305 
306  // condition check (currently only implemented for read permission)
307  if (!$this->doConditionCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type))
308  {
309  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
310  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
311  $this->setPreventCachingLastResult(true); // do not store this in db, since condition updates are not monitored
312  return false;
313  }
314 
315  // object type specific check
316  if (!$this->doStatusCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type))
317  {
318  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
319  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
320  $this->setPreventCachingLastResult(true); // do not store this in db, since status updates are not monitored
321  return false;
322  }
323 
324  // check for available licenses
325  if (!$this->doLicenseCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_obj_id, $a_type))
326  {
327  $this->setPreventCachingLastResult(true); // do not store this in db, since status updates are not monitored
328  return false;
329  }
330 
331  // all checks passed
332  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, true, $a_user_id);
333  return true;
334  }
335 
339  function getInfo()
340  {
341  //return $this->last_result;
342  //$this->last_info->setQueryData($this->current_result_element);
343  //var_dump("<pre>",$this->results,"</pre>");
344  return is_object($this->last_info) ? $this->last_info->getInfoItems() : array();
345  }
346 
350  function getResultLast()
351  {
352  return $this->last_result;
353  }
354 
355  function getResultAll($a_ref_id = "")
356  {
357  if ($a_ref_id == "")
358  {
359  return $this->results;
360  }
361 
362  return $this->results[$a_ref_id];
363  }
364 
369  function doCacheCheck($a_permission, $a_cmd, $a_ref_id,$a_user_id)
370  {
371  global $ilBench;
372  //echo "cacheCheck<br/>";
373 
374  $ilBench->start("AccessControl", "1000_checkAccess_get_cache_result");
375  $stored_access = $this->getStoredAccessResult($a_permission, $a_cmd, $a_ref_id,$a_user_id);
376  //var_dump($stored_access);
377  if (is_array($stored_access))
378  {
379  $this->current_info = $stored_access["info"];
380  //var_dump("cache-treffer:");
381  $ilBench->stop("AccessControl", "1000_checkAccess_get_cache_result");
382  return array("hit" => true, "granted" => $stored_access["granted"],
383  "prevent_db_cache" => $stored_access["prevent_db_cache"]);
384  }
385 
386  // not in cache
387  $ilBench->stop("AccessControl", "1000_checkAccess_get_cache_result");
388  return array("hit" => false, "granted" => false,
389  "prevent_db_cache" => false);
390  }
391 
396  function doTreeCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id)
397  {
398  global $tree, $lng, $ilBench;
399  //echo "treeCheck<br/>";
400 
401  // Get stored result
402  $tree_cache_key = $a_user_id.':'.$a_ref_id;
403  if (array_key_exists($tree_cache_key, $this->obj_tree_cache)) {
404  // Store access result
405  if (!$this->obj_tree_cache[$tree_cache_key])
406  {
407  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
408  }
409  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, $this->obj_tree_cache[$tree_cache_key], $a_user_id);
410 
411  return $this->obj_tree_cache[$tree_cache_key];
412  }
413 
414  $ilBench->start("AccessControl", "2000_checkAccess_in_tree");
415 
416  if(!$tree->isInTree($a_ref_id) or $tree->isDeleted($a_ref_id))
417  {
418  // Store negative access results
419 
420  // Store in tree cache
421  // Note, we only store up to 1000 results to avoid memory overflow.
422  if (count($this->obj_tree_cache) < 1000)
423  {
424  $this->obj_tree_cache[$tree_cache_key] = false;
425  }
426 
427  // Store in result cache
428  $this->current_info->addInfoItem(IL_DELETED, $lng->txt("object_deleted"));
429  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
430 
431  $ilBench->stop("AccessControl", "2000_checkAccess_in_tree");
432 
433  return false;
434  }
435 
436  // Store positive access result.
437 
438  // Store in tree cache
439  // Note, we only store up to 1000 results to avoid memory overflow.
440  if (count($this->obj_tree_cache) < 1000)
441  {
442  $this->obj_tree_cache[$tree_cache_key] = true;
443  }
444 
445  // Store in result cache
446  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, true, $a_user_id);
447 
448  $ilBench->stop("AccessControl", "2000_checkAccess_in_tree");
449  return true;
450  }
451 
456  function doRBACCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_type)
457  {
458  global $lng, $ilBench, $ilErr, $ilLog;
459 
460  $ilBench->start("AccessControl", "2500_checkAccess_rbac_check");
461 
462  if ($a_permission == "")
463  {
464  $message = sprintf('%s::doRBACCheck(): No operations given! $a_ref_id: %s',
465  get_class($this),
466  $a_ref_id);
467  $ilLog->write($message,$ilLog->FATAL);
468  $ilErr->raiseError($message,$ilErr->MESSAGE);
469  }
470 
471  if (isset($this->stored_rbac_access[$a_user_id."-".$a_permission."-".$a_ref_id]))
472  {
473  $access = $this->stored_rbac_access[$a_user_id."-".$a_permission."-".$a_ref_id];
474  }
475  else
476  {
477  $access = $this->rbacsystem->checkAccessOfUser($a_user_id, $a_permission, $a_ref_id, $a_type);
478  if (!is_array($this->stored_rbac_access) || count($this->stored_rbac_access) < 1000)
479  {
480  if ($a_permission != "create")
481  {
482  $this->stored_rbac_access[$a_user_id."-".$a_permission."-".$a_ref_id] = $access;
483  }
484  }
485  }
486 
487  // Store in result cache
488  if (!$access)
489  {
490  $this->current_info->addInfoItem(IL_NO_PERMISSION, $lng->txt("status_no_permission"));
491  }
492  if ($a_permission != "create")
493  {
494  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, true, $a_user_id);
495  }
496  $ilBench->stop("AccessControl", "2500_checkAccess_rbac_check");
497 
498  return $access;
499  }
500 
505  function doPathCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all = false)
506  {
507  global $tree, $lng, $ilBench,$ilObjDataCache;
508 //echo "<br>dopathcheck";
509  //echo "pathCheck<br/>";
510  $ilBench->start("AccessControl", "3100_checkAccess_check_parents_get_path");
511 
512 // if (isset($this->stored_path[$a_ref_id]))
513 // {
514 // $path = $this->stored_path[$a_ref_id];
515 // }
516 // else
517 // {
518  $path = $tree->getPathId($a_ref_id);
519 // $this->stored_path[$a_ref_id] = $path;
520 // }
521  $ilBench->stop("AccessControl", "3100_checkAccess_check_parents_get_path");
522 
523  foreach ($path as $id)
524  {
525  if ($a_ref_id == $id)
526  {
527  continue;
528  }
529 
530  // Check course activation
531  if($ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($id)) == 'crs')
532  {
533  if(!$this->doActivationCheck($a_permission,$a_cmd,$a_ref_id,$a_user_id,$a_all))
534  {
535  return false;
536  }
537  }
538 
539  $access = $this->checkAccessOfUser($a_user_id, "read", "info", $id);
540 
541  if ($access == false)
542  {
543 
544  //$this->doCacheCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id);
545  $this->current_info->addInfoItem(IL_NO_PARENT_ACCESS, $lng->txt("no_parent_access"),$id);
546 
547  if ($a_all == false)
548  {
549  return false;
550  }
551  }
552  }
553 
554  return true;
555  }
556 
561  function doActivationCheck($a_permission, $a_cmd, $a_ref_id, $a_user_id, $a_all = false)
562  {
563  global $ilBench,$ilObjDataCache;
564 
565  $ilBench->start("AccessControl", "3150_checkAccess_check_course_activation");
566 
567  $cache_perm = ($a_permission == "visible")
568  ? "visible"
569  : "other";
570 
571 //echo "<br>doActivationCheck-$cache_perm-$a_ref_id-$a_user_id-".$ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
572 
573  if (isset($this->ac_cache[$cache_perm][$a_ref_id][$a_user_id]))
574  {
575  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
576  return $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id];
577  }
578 
579  // nothings needs to be done if current permission is write permission
580  if($a_permission == 'write')
581  {
582  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
583  return true;
584  }
585  include_once 'Modules/Course/classes/class.ilCourseItems.php';
586 
587  $this->preloadActivationTimes(array($a_ref_id));
588  if(isset($this->ac_times[$a_ref_id]))
589  {
590  // read preloaded
591  $item_data = $this->ac_times[$a_ref_id];
592  }
593  else
594  {
595  global $ilLog;
596  $ilLog->write(__METHOD__.': Error preloading activation times failed.');
597  $item_data = ilCourseItems::_readActivationTimes(array($a_ref_id));
598  $item_data = $item_data[$a_ref_id];
599  }
600 
601 
602  // if activation isn't enabled
603  if($item_data['timing_type'] != IL_CRS_TIMINGS_ACTIVATION)
604  {
605  $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id] = true;
606  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
607  return true;
608  }
609 
610  // if within activation time
611  if((time() >= $item_data['timing_start']) and
612  (time() <= $item_data['timing_end']))
613  {
614  $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id] = true;
615  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
616  return true;
617  }
618 
619  // if user has write permission
620  if($this->checkAccessOfUser($a_user_id, "write", "", $a_ref_id))
621  {
622  $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id] = true;
623  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
624  return true;
625  }
626  // if current permission is visible and visible is set in activation
627  if($a_permission == 'visible' and $item_data['visible'])
628  {
629  $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id] = true;
630  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
631  return true;
632  }
633  // no access
634  $this->ac_cache[$cache_perm][$a_ref_id][$a_user_id] = false;
635  $ilBench->stop("AccessControl", "3150_checkAccess_check_course_activation");
636  return false;
637  }
638 
647  public function preloadActivationTimes($a_ref_ids)
648  {
649  include_once('Modules/Course/classes/class.ilCourseItems.php');
650 
651  $read_arr = array();
652  foreach($a_ref_ids as $ref_id)
653  {
654  if(!isset($this->ac_times[$ref_id]))
655  {
656  $read_arr[] = $ref_id;
657  }
658  }
659  if(count($read_arr))
660  {
661  $this->ac_times = (array) $this->ac_times + ilCourseItems::_readActivationTimes($read_arr);
662  }
663  }
664 
669  function doConditionCheck($a_permission, $a_cmd, $a_ref_id,$a_user_id, $a_obj_id, $a_type)
670  {
671  //echo "conditionCheck<br/>";
672  global $lng, $ilBench;
673 
674  if (($a_permission == "read" or $a_permission == 'join') &&
675  !$this->checkAccessOfUser($a_user_id, "write", "", $a_ref_id, $a_type, $a_obj_id))
676  {
677  $ilBench->start("AccessControl", "4000_checkAccess_condition_check");
678  if(!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id,$a_obj_id,$a_type,$a_user_id))
679  {
680  $conditions = ilConditionHandler::_getConditionsOfTarget($a_ref_id,$a_obj_id, $a_type);
681  foreach ($conditions as $condition)
682  {
683  $this->current_info->addInfoItem(IL_MISSING_PRECONDITION,
684  $lng->txt("missing_precondition").": ".
685  ilObject::_lookupTitle($condition["trigger_obj_id"])." ".
686  $lng->txt("condition_".$condition["operator"])." ".
687  $condition["value"], $condition);
688  }
689  $ilBench->stop("AccessControl", "4000_checkAccess_condition_check");
690  return false;
691  }
692  $ilBench->stop("AccessControl", "4000_checkAccess_condition_check");
693  }
694 
695  return true;
696  }
697 
702  function doStatusCheck($a_permission, $a_cmd, $a_ref_id,$a_user_id, $a_obj_id, $a_type)
703  {
704  global $objDefinition, $ilBench;
705  //echo "statusCheck<br/>";
706  $ilBench->start("AccessControl", "5000_checkAccess_object_check");
707 
708  $class = $objDefinition->getClassName($a_type);
709  $location = $objDefinition->getLocation($a_type);
710  $full_class = "ilObj".$class."Access";
711  include_once($location."/class.".$full_class.".php");
712  // static call to ilObj..::_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id)
713 
714  $ilBench->start("AccessControl", "5001_checkAccess_".$full_class."_check");
715  $obj_access = call_user_func(array($full_class, "_checkAccess"),
716  $a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id);
717  $ilBench->stop("AccessControl", "5001_checkAccess_".$full_class."_check");
718  if (!($obj_access === true))
719  {
720  //Note: We must not add an info item here, because one is going
721  // to be added by the user function we just called a few
722  // lines above.
723  //$this->current_info->addInfoItem(IL_NO_OBJECT_ACCESS, $obj_access);
724 
725  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
726  $ilBench->stop("AccessControl", "5000_checkAccess_object_check");
727  return false;
728  }
729 
730  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, true, $a_user_id);
731  $ilBench->stop("AccessControl", "5000_checkAccess_object_check");
732  return true;
733  }
734 
738  function doLicenseCheck($a_permission, $a_cmd, $a_ref_id,$a_user_id, $a_obj_id, $a_type)
739  {
740  global $lng;
741 
742  // simple checks first
743  if (!in_array($a_type, array('sahs','htlm'))
744  or !in_array($a_permission, array('read')))
745  {
746  $has_access = true;
747  }
748  else
749  {
750  require_once("Services/License/classes/class.ilLicenseAccess.php");
751 
752  // licensing globally disabled => access granted
754  {
755  $has_access = true;
756  }
757  /* resolved mantis issue #5288:
758  * admins should not automatically have read access!
759  * their read access will also be noted and consume a license
760  elseif ($this->rbacsystem->checkAccessOfUser($a_user_id, "edit_permissions", $a_ref_id))
761  {
762  $has_access = true;
763  }
764  */
765  // now do the real check
766  else
767  {
768  $has_access = ilLicenseAccess::_checkAccess($a_user_id, $a_obj_id);
769  }
770  }
771 
772  if ($has_access)
773  {
774  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, true, $a_user_id);
775  return true;
776  }
777  else
778  {
779  $this->current_info->addInfoItem(IL_NO_LICENSE, $lng->txt("no_license_available"));
780  $this->storeAccessResult($a_permission, $a_cmd, $a_ref_id, false, $a_user_id);
781  return false;
782  }
783  }
784 
785  function clear()
786  {
787  $this->results = array();
788  $this->last_result = "";
789  $this->current_info = new ilAccessInfo();
790  }
791 
792  function enable($a_str,$a_bool)
793  {
794  $this->$a_str = $a_bool;
795  }
796 }