當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tracker::userCanView方法代碼示例

本文整理匯總了PHP中Tracker::userCanView方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker::userCanView方法的具體用法?PHP Tracker::userCanView怎麽用?PHP Tracker::userCanView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tracker的用法示例。


在下文中一共展示了Tracker::userCanView方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: checkUserCanAccessTracker

 /**
  * Check that tracker can be accessed by user
  *
  * @param Tracker         $tracker
  * @param User            $user
  * @param Codendi_Request $request
  *
  * @throws Tracker_CannotAccessTrackerException
  */
 public function checkUserCanAccessTracker($tracker, $user, Codendi_Request $request)
 {
     $this->checkServiceEnabled($tracker->getProject(), $request);
     if (!$tracker->isActive()) {
         throw new Tracker_CannotAccessTrackerException($GLOBALS['Language']->getText('plugin_tracker_common_type', 'tracker_not_exist'));
     }
     if (!$tracker->userCanView($user)) {
         throw new Tracker_CannotAccessTrackerException($GLOBALS['Language']->getText('plugin_tracker_common_type', 'no_view_permission'));
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:19,代碼來源:TrackerManager.class.php

示例2: checkUserCanViewTracker

 /**
  * @throws SoapFault if user can't view the tracker
  */
 private function checkUserCanViewTracker(Tracker $tracker, PFUser $user)
 {
     if (!$tracker->userCanView($user)) {
         throw new Exception('Permission Denied: You are not granted sufficient permission to perform this operation.', (string) get_tracker_factory_fault);
     }
     $this->checkUserCanAccessProject($user, $tracker->getProject());
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:10,代碼來源:SOAPServer.class.php

示例3: trackerCanBeDisplayed

 private function trackerCanBeDisplayed(Tracker $tracker, PFUser $user)
 {
     return $tracker->userCanView($user) && !$this->getTV3MigrationManager()->isTrackerUnderMigration($tracker);
 }
開發者ID:blestab,項目名稱:tuleap,代碼行數:4,代碼來源:TrackerManager.class.php


注:本文中的Tracker::userCanView方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。