Exemplo n.º 1
0
 public static function getAuthIfUserCanDoIt($p_userID, $p_action, $p_targetModel = null)
 {
     $auth = parent::getAuthIfUserCanDoIt($p_userID, $p_action, $p_targetModel);
     $_user = Utility::getUserByID($p_userID);
     if (is_object($_user)) {
         switch ($p_action) {
             case 'add':
                 break;
             case 'update':
                 break;
             case 'detail':
                 break;
             case 'list':
                 break;
         }
     }
     return $auth;
 }
Exemplo n.º 2
0
 public static function getAuthIfUserCanDoIt($p_userID, $p_action, $p_targetModel = null)
 {
     $auth = parent::getAuthIfUserCanDoIt($p_userID, $p_action, $p_targetModel);
     $_user = Utility::getUserByID($p_userID);
     if (is_object($_user)) {
         switch ($p_action) {
             case 'add':
                 break;
             case 'update':
                 break;
             case 'detail':
             case 'list':
                 //                     if ((is_object($p_targetModel) && $p_targetModel->getReadStatus()>0) || (is_array($p_targetModel) &&count($p_targetModel)>0 && is_object($p_targetModel[0]) && $p_targetModel[0]->getReadStatus()>0) )
                 //                     {
                 //                         $auth = 'self';//作者
                 //                     }
                 break;
         }
     }
     return $auth;
 }