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