本文整理汇总了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();
}
示例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);
}