diff --git a/codepot/README b/codepot/README index 03d98ae6..65e133db 100644 --- a/codepot/README +++ b/codepot/README @@ -20,6 +20,8 @@ INSTALLATION You should perform the following tasks after the RPM installation. * Initialize the mysql database using /etc/codepot/codepot.mysql. + * Add the following switch to /etc/httpd/conf.d/perl.conf + PerlSwitches -Mlib=/etc/codepot/perl * Configure /etc/httpd/conf.d/codepot.conf * Configure /etc/codepot/codepot.ini * Restart httpd diff --git a/codepot/etc/codepot.ini.in b/codepot/etc/codepot.ini.in index ac722330..e25a3364 100644 --- a/codepot/etc/codepot.ini.in +++ b/codepot/etc/codepot.ini.in @@ -187,6 +187,12 @@ allow_set_time_limit = "no" ;------------------------------------------------------------------------------ signin_for_code_search = "yes" +;------------------------------------------------------------------------------ +; For a public project, subversion access is limited to members only when +; this item is set to yes. When no, this access is open to everyone. +;------------------------------------------------------------------------------ +svn_for_members_only = "yes" + ;------------------------------------------------------------------------------ ; customized footer ;------------------------------------------------------------------------------ diff --git a/codepot/etc/perl/Codepot/AccessHandler.pm b/codepot/etc/perl/Codepot/AccessHandler.pm index fe862276..e260e146 100644 --- a/codepot/etc/perl/Codepot/AccessHandler.pm +++ b/codepot/etc/perl/Codepot/AccessHandler.pm @@ -71,7 +71,9 @@ sub get_config database_password => $cfg->param ('database_password'), database_name => $cfg->param ('database_name'), database_driver => $cfg->param ('database_driver'), - database_prefix => $cfg->param ('database_prefix') + database_prefix => $cfg->param ('database_prefix'), + + svn_for_members_only => $cfg->param ('svn_for_members_only') }; return $config; @@ -285,7 +287,10 @@ sub __handler } elsif ($public >= 1) { - return Apache2::Const::OK; + if (lc($cfg->{svn_for_members_only}) eq 'no') + { + return Apache2::Const::OK; + } } } diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index 93f52ca8..3bc61527 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -115,7 +115,7 @@ class IssueModel extends Model } if (strlen($userid) > 0) - { + { $this->db->order_by ('id', 'desc'); } else diff --git a/codepot/src/codepot/models/ldaploginmodel.php b/codepot/src/codepot/models/ldaploginmodel.php index 7cc02857..c5f875a9 100644 --- a/codepot/src/codepot/models/ldaploginmodel.php +++ b/codepot/src/codepot/models/ldaploginmodel.php @@ -31,7 +31,7 @@ class LdapLoginModel extends LoginModel $f_basedn = $this->formatString (CODEPOT_LDAP_USERID_SEARCH_BASE, $userid, $password); $f_filter = $this->formatString (CODEPOT_LDAP_USERID_SEARCH_FILTER, $userid, $password); - $bind = @ldap_bind ($ldap, $f_userid, $f_password); + $bind = @ldap_bind ($ldap, $f_rootdn, $f_rootpw); if ($bind === FALSE) { $this->setErrorMessage (ldap_error ($ldap)); diff --git a/codepot/src/codepot/views/Makefile.am b/codepot/src/codepot/views/Makefile.am index c2999fb1..588c7da8 100644 --- a/codepot/src/codepot/views/Makefile.am +++ b/codepot/src/codepot/views/Makefile.am @@ -7,6 +7,7 @@ www_DATA = \ code_folder.php \ code_history.php \ code_revision.php \ + code_search.php \ file_delete.php \ file_edit.php \ file_home.php \ diff --git a/codepot/src/codepot/views/Makefile.in b/codepot/src/codepot/views/Makefile.in index 315b6535..d9726bcc 100644 --- a/codepot/src/codepot/views/Makefile.in +++ b/codepot/src/codepot/views/Makefile.in @@ -147,6 +147,7 @@ www_DATA = \ code_folder.php \ code_history.php \ code_revision.php \ + code_search.php \ file_delete.php \ file_edit.php \ file_home.php \ diff --git a/codepot/src/config.php.in b/codepot/src/config.php.in index 418def9b..6ffc6371 100644 --- a/codepot/src/config.php.in +++ b/codepot/src/config.php.in @@ -76,6 +76,7 @@ function load_ini ($file) array ('force_project_delete', 'boolean', FALSE), array ('allow_set_time_limit', 'boolean', FALSE), array ('signin_for_code_search', 'boolean', TRUE), + array ('svn_for_members_only', 'boolean', FALSE), array ('footer', 'string', '') );