Index: openacs-4/packages/dotlrn/www/configure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/configure.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/configure.tcl 24 May 2002 01:58:45 -0000 1.12 +++ openacs-4/packages/dotlrn/www/configure.tcl 13 Jul 2002 19:16:49 -0000 1.13 @@ -15,56 +15,39 @@ # ad_page_contract { - Displays a configuration page + Displays a configuration page for user's portal ONLY! + + Community portals are configured by the one-community-portal-configure + page. + @author Ben Adida (ben@openforce.net) @author Arjun Sanyal (arjun@openforce.net) @author yon (yon@openforce.net) @creation-date 2001-10-24 @version $Id$ -} -query { + } -# Check if this is a community type level thing if {[parameter::get -parameter community_type_level_p] == 1} { + + # at a community type level, redirect ad_returnredirect "one-community-type" return -} -# Make sure user is logged in -set user_id [ad_maybe_redirect_for_registration] +} elseif {[parameter::get -parameter community_level_p] == 1} { -if {[parameter::get -parameter community_level_p] == 1} { - # This is a community - # What community type are we at? - set community_id [dotlrn_community::get_community_id] + # at a community, only admins can configure a comm's portal + ad_returnredirect "one-community" + return - # Check that this user is a member - if {![dotlrn_community::member_p $community_id $user_id]} { - set context_bar [list "Not a member"] - - ad_return_template one-community-not-member - return - } else { - set portal_id [dotlrn_community::get_portal_id -community_id $community_id] - set rendered_page [portal::configure $portal_id "one-community"] - set context_bar {Configure} - set name [portal::get_name $portal_id] - } } else { - # this not a community, it is the "workspace" deal + # do i have access to my personal portal? + dotlrn::require_user_browse -user_id [ad_conn user_id] - # Get the page set portal_id [dotlrn::get_portal_id -user_id $user_id] - # If there is no portal_id, this user is either a guest or something else - if {[empty_string_p $portal_id]} { - # do something - ad_returnredirect "./" - } else { - set rendered_page [portal::configure $portal_id "index"] - set name [portal::get_name $portal_id] - } + set rendered_page [portal::configure $portal_id "index"] } ad_return_template