Index: openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-admin/www/auth/authority-registration-select.tcl 12 Sep 2003 14:33:23 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + Select a certain authority to be used to register + users. + + @author Peter Marklund +} { + authority_id:integer +} + +# Check that the authority has a register implementation +auth::authority::get -authority_id $authority_id -array authority +if { [empty_string_p $authority(register_impl_id)] } { + ad_return_error "No register driver" "The authority $authority(pretty_name) does not have a register driver and cannot register users" +} + +parameter::set_value -package_id [apm_package_id_from_key acs-authentication] -parameter RegisterAuthority -value $authority(short_name) + +ad_returnredirect [export_vars -base "." { authority_id }] \ No newline at end of file Index: openacs-4/packages/acs-admin/www/auth/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-admin/www/auth/index.tcl 11 Sep 2003 09:21:27 -0000 1.2 +++ openacs-4/packages/acs-admin/www/auth/index.tcl 12 Sep 2003 14:32:17 -0000 1.3 @@ -53,6 +53,27 @@ } } + registration { + label "Account Registration" + html { align center } + display_template { + + + + + + + + + + + no driver + + + } + } auth_impl { label "Authentication Driver" } @@ -74,14 +95,19 @@ } sub_class narrow - } + } } +# The authority currently selected for registering users +set register_authority_id [auth::get_register_authority] + db_multirow -extend { enabled_p_url sort_order_url_up sort_order_url_down - delete_url + delete_url + registration_url + registration_status } authorities authorities_select { select authority_id, short_name, @@ -101,4 +127,16 @@ set delete_url [export_vars -base authority-delete { authority_id }] set sort_order_url_up "authority-set-sort-order?[export_vars { authority_id {direction up} }]" set sort_order_url_down "authority-set-sort-order?[export_vars { authority_id {direction down} }]" + + if { [string equal $authority_id $register_authority_id] } { + # The authority is selected as register authority + set registration_status "selected" + } elseif { ![empty_string_p $reg_impl] } { + # The authority can be selected as register authority + set registration_status "can_select" + set registration_url [export_vars -base authority-registration-select { authority_id }] + } else { + # This authority has no account creation driver + set registration_status "cannot_select" + } }