Index: openacs-4/packages/acs-subsite/www/members/member-invite.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/member-invite.tcl,v diff -u -r1.6 -r1.6.2.1 --- openacs-4/packages/acs-subsite/www/members/member-invite.tcl 26 Jan 2004 15:39:46 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/members/member-invite.tcl 19 Mar 2004 13:09:35 -0000 1.6.2.1 @@ -6,23 +6,11 @@ @cvs-id $Id$ } -auth::require_login +subsite::assert_user_may_add_member set group_id [application_group::group_id_from_package_id] +set admin_p [permission::permission_p -object_id $group_id -privilege "admin"] -set admin_p [ad_permission_p -user_id [ad_conn user_id] $group_id "admin"] - -if { !$admin_p } { - # If not admin, user must be member of group, and members must be allowed to invite other members - if { ![parameter::get -parameter "MembersCanInviteMembersP" -default 0] || \ - ![group::member_p -group_id $group_id] } { - - ad_return_forbidden "Cannot invite members" "I'm sorry, but you're not allowed to invite members to this group" - ad_script_abort - } -} - - set page_title "Inivite Member to [ad_conn instance_name]" set context [list [list "." "Members"] "Invite"]