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


PHP SugarController::checkEntryPointRequiresAuth方法代碼示例

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


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

示例1: execute

 /**
  * Perform execution of the application. This method is called from index2.php
  *
  * @param Request $request
  */
 function execute(Request $request)
 {
     global $sugar_config;
     if (!empty($sugar_config['default_module'])) {
         $this->default_module = $sugar_config['default_module'];
     }
     $module = $this->default_module;
     if (!empty($_REQUEST['module'])) {
         $module = $_REQUEST['module'];
     }
     insert_charset_header();
     $this->setupPrint();
     $this->controller = ControllerFactory::getController($module);
     // if the entry point is defined to not need auth, then don't authenicate
     if (!$request->has('entryPoint') || $this->controller->checkEntryPointRequiresAuth($request->query('entryPoint'))) {
         $this->loadUser();
         $this->ACLFilter();
         $this->preProcess();
         $this->getController()->preProcess();
         $this->checkHTTPReferer();
     }
     SugarThemeRegistry::buildRegistry();
     $this->loadLanguages();
     $this->checkDatabaseVersion();
     $this->loadDisplaySettings();
     $this->loadLicense();
     $this->loadGlobals();
     $this->setupResourceManagement($module);
     $this->getController()->execute();
     sugar_cleanup();
 }
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:36,代碼來源:SugarApplication.php

示例2: testcheckEntryPointRequiresAuth

 public function testcheckEntryPointRequiresAuth()
 {
     $SugarController = new SugarController();
     //check with a invalid value
     $result = $SugarController->checkEntryPointRequiresAuth('');
     $this->assertTrue($result);
     //cehck with a valid True value
     $result = $SugarController->checkEntryPointRequiresAuth('download');
     $this->assertTrue($result);
     //cehck with a valid False value
     $result = $SugarController->checkEntryPointRequiresAuth('GeneratePassword');
     $this->assertFalse($result);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:13,代碼來源:SugarControllerTest.php


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