Index: openacs-4/packages/acs-subsite/www/user/password-update-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/Attic/password-update-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 16 May 2002 01:36:04 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/user/password-update-2.tcl 16 May 2002 21:04:49 -0000 1.8 @@ -13,7 +13,7 @@ {return_url ""} } -validate { old_password_match -requires {user_id:integer password_old} { - if {![permission::permission_p -object_id $user_id -privilege "admin"] && ![empty_string_p $user_id] && ![ad_check_password $user_id $password_old]} { + if {![permission::permission_p -object_id $user_id -privilege admin] && ![empty_string_p $user_id] && ![ad_check_password $user_id $password_old]} { ad_complain "Your current password does not match what you entered in the form." } } @@ -33,8 +33,12 @@ set user_id [ad_verify_and_get_user_id] } -permission::require_permission -party_id $user_id -object_id $user_id -privilege "write" +set admin_p [permission::permission_p -object_id $user_id -privilege admin] +if {!$admin_p} { + permission::require_permission -party_id $user_id -object_id $user_id -privilege write +} + if {[catch {ad_change_password $user_id $password_1} errmsg]} { ad_return_error "Wasn't able to change your password. Please contact the system administrator." } Index: openacs-4/packages/acs-subsite/www/user/password-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/user/password-update.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-subsite/www/user/password-update.tcl 13 May 2002 17:16:14 -0000 1.7 +++ openacs-4/packages/acs-subsite/www/user/password-update.tcl 16 May 2002 21:04:49 -0000 1.8 @@ -17,13 +17,14 @@ if {[empty_string_p $user_id]} { set user_id [ad_verify_and_get_user_id] - permission::require_permission -party_id $user_id -object_id $user_id -privilege "write" -} else { - permission::require_permission -object_id $user_id -privilege "admin" } -set admin_p [permission::permission_p -object_id $user_id -privilege "admin"] +set admin_p [permission::permission_p -object_id $user_id -privilege admin] +if {!$admin_p} { + permission::require_permission -party_id $user_id -object_id $user_id -privilege write +} + db_1row user_information {} set site_link [ad_site_home_link]