Index: openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl	30 Mar 2006 16:01:46 -0000	1.1
+++ openacs-4/packages/imsld/www/admin/imsld-role-confirm.tcl	30 Mar 2006 16:32:28 -0000	1.2
@@ -44,7 +44,7 @@
 }
 
 #FIXME: falta comprobar match_persons_p
-if {![string eq "t" $match_persons_p]} {
+if {[string eq "t" $match_persons_p]} {
     #get not-allowed users
     set not_allowed [db_list other_subroles_members {}]
         
Index: openacs-4/packages/imsld/www/admin/imsld-role-members.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-members.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/imsld/www/admin/imsld-role-members.tcl	30 Mar 2006 16:01:46 -0000	1.1
+++ openacs-4/packages/imsld/www/admin/imsld-role-members.tcl	30 Mar 2006 16:32:28 -0000	1.2
@@ -12,6 +12,19 @@
     members_list:optional
 } 
 
+#check conditions and set the database
+set role_info [imsld::roles::get_role_info -role_id $role]
+set match_persons_p [lindex $role_info 3]
+
+set not_allowed [db_list other_subroles_members {}]
+
+if {[string eq "t" $match_persons_p] && [llength $not_allowed]} {
+
+} else {
+    set not_allowed [list 0 0]
+}
+
+
 if {![string eq $group_instance "0"] && [db_0or1row has_role_parent_p {}]} {
     if {![info exist members_list]} {
         set members_list [db_list get_members_list_2 {}]
Index: openacs-4/packages/imsld/www/admin/imsld-role-members.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-members.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/imsld/www/admin/imsld-role-members.xql	30 Mar 2006 16:01:46 -0000	1.1
+++ openacs-4/packages/imsld/www/admin/imsld-role-members.xql	30 Mar 2006 16:32:28 -0000	1.2
@@ -45,6 +45,7 @@
         from group_member_map gmm
         where container_id=:parent_instance
               and not (member_id in ([join $members_list ","]))
+              and not (gmm.member_id in ([join $not_allowed ","]))
 		</querytext>
 	</fullquery>  
     
@@ -89,5 +90,21 @@
         </querytext>
 	</fullquery>
 
-    
+     <fullquery name="other_subroles_members">
+		<querytext>
+        select gmm.member_id 
+        from imsld_roles ir1, 
+             imsld_rolesi ir2,
+             acs_rels ar,
+             group_member_map gmm 
+        where ir1.role_id=:role and 
+              ir1.parent_role_id=ir2.parent_role_id and 
+              ir2.role_id!=ir1.role_id and 
+              ar.object_id_one=ir2.item_id and 
+              ar.rel_type='imsld_role_group_rel' and 
+              gmm.group_id=ar.object_id_two
+        group by member_id
+        </querytext>
+	</fullquery>
+   
 </queryset>