Ejemplo n.º 1
0
    $o = new \svnadmin\providers\EngineBaseAuthenticator();
    $appEngine->setAuthenticator($o);
    // Engine: IAclManager
    // The ACL feature can only be used with authentication.
    if (true) {
        include_once "./classes/core/acl/FSAclManager.class.php";
        $o = new \svnadmin\core\acl\FSAclManager($cfg->getValue("ACLManager", "UserRoleAssignmentFile"));
        $appEngine->setAclManager($o);
        $appTemplate->setAcl($appEngine);
    }
}
/**
 * An administrator role MUST be defined, if the authentication is active.
 * Otherwise nobody could setup the application.
 */
$appCurrentScriptFile = currentScriptFileName();
if ($appEngine->isAuthenticationActive() && $appCurrentScriptFile != "settings.php" && $appCurrentScriptFile != "update_ldap.php") {
    if (!$appEngine->getAclManager()->hasAdminDefined()) {
        header("Location: settings.php");
        exit(0);
    }
}
///////////////////////////////////////////////////////////////////////////////
// Global User Initinalizations.
///////////////////////////////////////////////////////////////////////////////
//
// Set user locale.
// Check whether the user has choosen a specific language
//
if (isset($_COOKIE["locale"]) && !empty($_COOKIE["locale"])) {
    // Get locale from user cookie.
Ejemplo n.º 2
0
function PrintCurrentScriptName()
{
    print currentScriptFileName();
}