Index: openacs-4/packages/acs-authentication/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/apm-callback-procs.tcl,v diff -u -r1.12 -r1.12.4.1 --- openacs-4/packages/acs-authentication/tcl/apm-callback-procs.tcl 31 Oct 2003 10:29:19 -0000 1.12 +++ openacs-4/packages/acs-authentication/tcl/apm-callback-procs.tcl 9 Jul 2004 22:00:09 -0000 1.12.4.1 @@ -110,7 +110,12 @@ acs_sc::impl::delete -contract_name "auth_sync_process" -impl_name "IMS_Enterprise_v_1p1_old" } } - } + 5.1.1 5.1.2 { + db_transaction { + auth::authentication::quick_sc_update + } + } + } } ##### @@ -140,6 +145,7 @@ username:string password:string parameters:string,multiple + authority_id:integer } output { auth_status:string @@ -203,6 +209,7 @@ old_password:string new_password:string parameters:string,multiple + authority_id:integer } output { password_status:string @@ -261,6 +268,7 @@ input { username:string parameters:string,multiple + authority_id:integer } output { password_status:string @@ -538,4 +546,29 @@ } +ad_proc -private auth::authentication::quick_sc_update {} { + SC update related to add authority_id new input +} { + # this is a direct update to the SC tables, we should expect a new + # API for handling updates on SC, but since there's no one yet, + # we'll do this way now .... (roc) + + set sc_change [list {auth_authentication.Authenticate.InputType} {auth_password.ChangePassword.InputType} {auth_password.ResetPassword.InputType}] + set element_msg_type_name integer + + foreach msg_type_name $sc_change { + set msg_type_id [db_string get_msg_type_id { select msg_type_id from acs_sc_msg_types where msg_type_name = :msg_type_name }] + set element_pos [db_string get_pos { select max(element_pos) from acs_sc_msg_type_elements where msg_type_id = :msg_type_id }] + incr element_pos + + acs_sc::msg_type::element::new \ + -msg_type_name $msg_type_name \ + -element_name authority_id \ + -element_msg_type_name $element_msg_type_name \ + -element_msg_type_isset_p f \ + -element_pos $element_pos + + } + +} \ No newline at end of file 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.63.2.2 -r1.63.2.3 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 29 Apr 2004 10:36:06 -0000 1.63.2.2 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 9 Jul 2004 22:00:09 -0000 1.63.2.3 @@ -1567,7 +1567,7 @@ -error \ -impl_id $impl_id \ -operation Authenticate \ - -call_args [list $username $password $parameters]] + -call_args [list $username $password $parameters $authority_id]] } ##### Index: openacs-4/packages/acs-authentication/tcl/local-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/local-procs.tcl,v diff -u -r1.26.2.2 -r1.26.2.3 --- openacs-4/packages/acs-authentication/tcl/local-procs.tcl 26 Mar 2004 13:46:12 -0000 1.26.2.2 +++ openacs-4/packages/acs-authentication/tcl/local-procs.tcl 9 Jul 2004 22:00:09 -0000 1.26.2.3 @@ -102,15 +102,18 @@ username password {parameters {}} + {authority_id {}} } { Implements the Authenticate operation of the auth_authentication service contract for the local account implementation. } { array set auth_info [list] - set authority_id [auth::authority::local] + if [empty_string_p $authority_id] { + set authority_id [auth::authority::local] + } - set user_id [acs_user::get_by_username -username $username] + set user_id [acs_user::get_by_username -authority_id $authority_id -username $username] if { [empty_string_p $user_id] } { set result(auth_status) "no_account" return [array get result] @@ -214,6 +217,7 @@ old_password new_password {parameters {}} + {authority_id {}} } { Implements the ChangePassword operation of the auth_password service contract for the local account implementation. @@ -223,7 +227,7 @@ password_message {} } - set user_id [acs_user::get_by_username -username $username] + set user_id [acs_user::get_by_username -authority_id $authority_id -username $username] if { [empty_string_p $user_id] } { set result(password_status) "no_account" return [array get result] @@ -244,7 +248,7 @@ if { [parameter::get -parameter EmailAccountOwnerOnPasswordChangeP -package_id [ad_acs_kernel_id] -default 1] } { with_catch errmsg { - acs_user::get -username $username -array user + acs_user::get -username $username -authority_id $authority_id -array user set system_name [ad_system_name] set pvt_home_name [ad_pvt_home_name] @@ -291,6 +295,8 @@ ad_proc -private auth::local::password::ResetPassword { username parameters + {authority_id {}} + {new_password {}} } { Implements the ResetPassword operation of the auth_password service contract for the local account implementation. @@ -300,14 +306,18 @@ password_message {} } - set user_id [acs_user::get_by_username -username $username] + set user_id [acs_user::get_by_username -authority_id $authority_id -username $username] if { [empty_string_p $user_id] } { set result(password_status) "no_account" return [array get result] } # Reset the password - set password [ad_generate_random_string] + if [empty_string_p $new_password] { + set password $new_password + } else { + set password [ad_generate_random_string] + } ad_change_password $user_id $password Index: openacs-4/packages/acs-authentication/tcl/password-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/password-procs.tcl,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/acs-authentication/tcl/password-procs.tcl 26 Jan 2004 15:39:41 -0000 1.11 +++ openacs-4/packages/acs-authentication/tcl/password-procs.tcl 9 Jul 2004 22:00:09 -0000 1.11.2.1 @@ -699,7 +699,8 @@ -call_args [list $username \ $old_password \ $new_password \ - $parameters]] + $parameters \ + $authority_id]] } ad_proc -private auth::password::RetrievePassword { @@ -763,5 +764,6 @@ -impl_id $impl_id \ -operation ResetPassword \ -call_args [list $username \ - $parameters]] + $parameters \ + $authority_id]] } Index: openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl 7 Jul 2004 00:33:10 -0000 1.6.2.2 +++ openacs-4/packages/auth-ldap/tcl/auth-ldap-procs.tcl 9 Jul 2004 22:00:37 -0000 1.6.2.3 @@ -229,6 +229,7 @@ username password {parameters {}} + {authority_id {}} } { Implements the Authenticate operation of the auth_authentication service contract for LDAP. @@ -301,6 +302,7 @@ old_password new_password {parameters {}} + {authority_id {}} } { Implements the ChangePassword operation of the auth_password service contract for LDAP. @@ -356,6 +358,7 @@ ad_proc -private auth::ldap::password::ResetPassword { username parameters + {authority_id {}} } { Implements the ResetPassword operation of the auth_password service contract for LDAP. Index: openacs-4/packages/auth-pam/tcl/auth-pam-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/auth-pam/tcl/auth-pam-procs.tcl,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/packages/auth-pam/tcl/auth-pam-procs.tcl 17 Sep 2003 11:30:08 -0000 1.1 +++ openacs-4/packages/auth-pam/tcl/auth-pam-procs.tcl 9 Jul 2004 22:00:58 -0000 1.1.4.1 @@ -65,6 +65,7 @@ username password {parameters {}} + {authority_id {}} } { Implements the Authenticate operation of the auth_authentication service contract for PAM. @@ -126,6 +127,7 @@ old_password new_password {parameters {}} + {authority_id {}} } { Implements the ChangePassword operation of the auth_password service contract for PAM. @@ -151,6 +153,7 @@ ad_proc -private auth::pam::password::ResetPassword { username parameters + {authority_id {}} } { Implements the ResetPassword operation of the auth_password service contract for PAM.