Index: openacs-4/packages/dotlrn/www/configure-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/configure-element.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/dotlrn/www/configure-element.tcl 24 May 2002 01:58:45 -0000 1.11 +++ openacs-4/packages/dotlrn/www/configure-element.tcl 31 May 2002 06:36:01 -0000 1.12 @@ -25,37 +25,25 @@ op:notnull } -# Check if this is a community type level thing if {[parameter::get -parameter community_type_level_p] == 1} { ad_returnredirect "one-community-type" - return + ad_script_abort } -# Make sure user is logged in set user_id [ad_maybe_redirect_for_registration] 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] + set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id $community_id] - # 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 + if {[dotlrn_community::member_p $community_id $user_id] || $admin_p} { + portal::configure_element $element_id $op "one-community" } else { - # they are a member, do the request - set rendered_page [portal::configure_element $element_id $op "one-community"] + ad_returnredirect "one-community" } } else { - # this not a community, it is the "workspace" deal - - # 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 "/."