Index: openacs-4/packages/acs-subsite/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/index.adp,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-subsite/www/index.adp 18 Sep 2003 20:59:39 -0000 1.8
+++ openacs-4/packages/acs-subsite/www/index.adp 22 Sep 2003 08:21:50 -0000 1.9
@@ -2,6 +2,22 @@
@subsite_name;noquote@
@context;noquote@
+
+
+ Leave group
+
+
+
+
+ Join group
+
+
+ Request membership
+
+
+
+
+
- (no packages)
Index: openacs-4/packages/acs-subsite/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/index.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-subsite/www/index.tcl 18 Sep 2003 20:59:39 -0000 1.9
+++ openacs-4/packages/acs-subsite/www/index.tcl 22 Sep 2003 08:21:50 -0000 1.10
@@ -40,3 +40,14 @@
set node_id [ad_conn node_id]
db_multirow nodes site_nodes {}
+
+
+# User's group membership
+
+set group_id [application_group::group_id_from_package_id]
+set group_join_policy [group::join_policy -group_id $group_id]
+
+set group_member_p [group::member_p -group_id $group_id -user_id $user_id]
+set group_admin_p [group::admin_p -group_id $group_id -user_id $user_id]
+
+set can_join_p [expr !$group_admin_p && $group_member_p == 0 && $user_id != 0 && ![string equal $group_join_policy "closed"]]