fixed a bug when handling ldap_auth_mode 2 in LdapLoginModel.
added svn_for_members_only and made relevant changes to AccessHandler.pm
This commit is contained in:
parent
acdf17ccb9
commit
daaf42b678
@ -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
|
||||
|
@ -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
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ class IssueModel extends Model
|
||||
}
|
||||
|
||||
if (strlen($userid) > 0)
|
||||
{
|
||||
{
|
||||
$this->db->order_by ('id', 'desc');
|
||||
}
|
||||
else
|
||||
|
@ -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));
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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', '')
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user