public function anonymous_access_to_script_allowed($params)
 {
     if (strpos($_SERVER['REQUEST_URI'], $this->getPluginPath()) === 0) {
         $url = new Git_URL(ProjectManager::instance(), $this->getRepositoryFactory(), $_SERVER['REQUEST_URI']);
         if ($url->isSmartHTTP()) {
             $params['anonymous_allowed'] = true;
         }
     }
 }
Example #2
0
 private function isGitPush(Git_URL $url)
 {
     return $url->isGitPush();
 }
Example #3
0
 private function routeUsingStandardURLs(Git_URL $url)
 {
     if (!$url->isStandard()) {
         return;
     }
     $repository = $url->getRepository();
     if (!$repository) {
         $this->addError('Bad request');
         $this->redirect('/');
         return;
     }
     $project = $url->getProject();
     $this->redirectIfTryingToViewRepositoryAndUserFriendlyURLsActivated($project, $repository, $url->getParameters());
     $this->request->set('group_id', $project->getId());
     $this->request->set('action', 'view');
     $this->request->set('repo_id', $repository->getId());
 }