Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
condition_admin_access.inc
1 <?php
17 require_once SQ_CORE_PACKAGE_PATH.'/system/conditions/condition/condition.inc';
18 
31 {
32 
33 
40  function __construct($assetid=0)
41  {
42  parent::__construct($assetid);
43 
44  }//end constructor
45 
46 
56  public static function evaluate(Asset $asset, Array $condition_data)
57  {
58  // first, check if someone's logged in
59  if ($GLOBALS['SQ_SYSTEM']->userPublic()) return FALSE;
60 
61  // next, check to see if the currently logged in user
62  // has write access
63  if (!$asset->adminAccess('')) return FALSE;
64 
65  return TRUE;
66 
67  }//end evaluate()
68 
69 
70 }//end class
71 ?>