Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v diff -u -r1.69 -r1.70 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 28 Oct 2004 17:37:08 -0000 1.69 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 13 Jan 2005 13:54:42 -0000 1.70 @@ -76,10 +76,11 @@ ad_proc -public auth::self_registration {} { #Check AllowSelfRegister parameter - if { ![parameter::get_from_package_key \ - -package_key acs-authentication \ - -parameter AllowSelfRegister] } { - ad_maybe_redirect_for_registration + if { [string is false [parameter::get_from_package_key \ + -package_key acs-authentication \ + -parameter AllowSelfRegister]] } { + util_user_message -message "Self registration is not allowed" + ad_maybe_redirect_for_registration } } @@ -1574,11 +1575,27 @@ -authority_id $authority_id \ -impl_id $impl_id] - return [acs_sc::invoke \ - -error \ - -impl_id $impl_id \ - -operation Authenticate \ - -call_args [list $username $password $parameters $authority_id]] + # See http://openacs.org/bugtracker/openacs/bug?format=table&f%5fstate=8&bug%5fnumber=2200 + # Basically, we want upgrades to work, so we have to check for + # version number -jfr + + set authentication_version [util_memoize [list apm_highest_version_name acs-authentication]] + set old_version_p [util_memoize [list apm_version_names_compare 5.1.3 $authentication_version]] + + if {[string is true $old_version_p]} { + return [acs_sc::invoke \ + -error \ + -impl_id $impl_id \ + -operation Authenticate \ + -call_args [list $username $password $parameters]] + + } else { + return [acs_sc::invoke \ + -error \ + -impl_id $impl_id \ + -operation Authenticate \ + -call_args [list $username $password $parameters $authority_id]] + } } #####