Beispiel #1
0
 /**
  * Check Authorizations
  * 
  * @return boolean
  * @access public
  * @since 11/8/07
  */
 public function canReply()
 {
     if (!CommentManager::instance()->isCommentingEnabled()) {
         return false;
     }
     // Check Authorizations
     $authZ = Services::getService('AuthZ');
     $idManager = Services::getService("Id");
     if (CommentManager::getCurrentAgent()->isEqual($idManager->getId('edu.middlebury.agents.anonymous'))) {
         return false;
     }
     if ($authZ->isUserAuthorized($idManager->getId('edu.middlebury.authorization.comment'), $this->getId())) {
         return true;
     } else {
         return false;
     }
 }