protected function postEventsActions(array $executed_events_ids, $queue_name) { $this->site_cache->restoreOwnership(); // Since generating aliases may be costly, do it only once everything else is processed if ($this->backend_aliases->aliasesNeedUpdate()) { $this->backend_aliases->update(); } // Update CVS root allow file once everything else is processed if ($this->backend_cvs->getCVSRootListNeedUpdate()) { $this->backend_cvs->CVSRootListUpdate(); } // Update SVN root definition for Apache once everything else is processed if ($this->backend_svn->getSVNApacheConfNeedUpdate()) { $this->backend_svn->generateSVNApacheConf(); // Need to refresh apache (graceful) system('/sbin/service httpd graceful'); } // Update system user and group caches once everything else is processed if ($this->backend_system->getNeedRefreshUserCache()) { $this->backend_system->refreshUserCache(); } if ($this->backend_system->getNeedRefreshGroupCache()) { $this->backend_system->refreshGroupCache(); } $this->triggerApplicationOwnerEventsProcessing(); }
public function process() { if ($this->getParameters()) { $this->backend_svn->setSVNApacheConfNeedUpdate(); $this->done(); } else { $this->error('No project id provided'); } }
public function process() { $group_id = $this->getIdFromParam(); $project = $this->getProject($group_id); if ($project) { $this->backend_svn->setSVNApacheConfNeedUpdate(); $this->done(); } else { $this->error("Unable to find project {$group_id}"); } }
public function process() { $group_id = $this->getIdFromParam(); $project = $this->getProject($group_id); if ($project) { try { $this->backend_svn->updateHooks($project); $this->done(); } catch (BackendSVNFileForSimlinkAlreadyExistsException $exception) { $this->warning($exception->getMessage()); } } else { $this->error("Unable to find project {$group_id}"); } }
/** * SVNAccessFile definition for repository root * * Block access to non project members if: * - project is private, * - or SVN is private * - or "restricted users" is enabled * * @see src/common/backend/BackendSVN#getSVNAccessRootPathDef($project) * * @param Project $project * * @return String */ function getSVNAccessRootPathDef($project) { $ldapPrjMgr = $this->getLDAPProjectManager(); if ($ldapPrjMgr->hasSVNLDAPAuth($project->getID())) { $conf = "[/]\n"; if (!$project->isPublic() || $project->isSVNPrivate() || ForgeConfig::areRestrictedUsersAllowed()) { $conf .= "* = \n"; } else { $conf .= "* = r\n"; } $conf .= "@members = rw\n"; return $conf; } else { return parent::getSVNAccessRootPathDef($project); } }
function testConstructor() { $backend = BackendSVN::instance(); }
/** * SVNAccessFile definition for repository root * * Block access to non project members if: * - project is private, * - or SVN is private * - or "restricted users" is enabled * * @see src/common/backend/BackendSVN#getSVNAccessRootPathDef($project) * * @param Project $project * * @return String */ function getSVNAccessRootPathDef($project) { $ldapPrjMgr = $this->getLDAPProjectManager(); if ($ldapPrjMgr->hasSVNLDAPAuth($project->getID())) { $conf = "[/]\n"; if (!$project->isPublic() || $project->isSVNPrivate() || $GLOBALS['sys_allow_restricted_users'] == 1) { $conf .= "* = \n"; } else { $conf .= "* = r\n"; } $conf .= "@members = rw\n"; return $conf; } else { return parent::getSVNAccessRootPathDef($project); } }
/** * Return a BackendSVN instance * * Let plugins propose their own backend. If none provided, use the default one. * * @return BackendSVN */ public static function getSVN() { $backend = null; $params = array('backend' => &$backend); EventManager::instance()->processEvent('backend_factory_get_svn', $params); if ($backend === null) { $backend = BackendSVN::instance(); } return $backend; }