Index: openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl 20 Jun 2018 09:40:11 -0000 1.6 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/one.tcl 4 Oct 2021 13:56:55 -0000 1.6.2.1 @@ -68,7 +68,20 @@ # We display up to 25 relations, and then offer a link for the rest. # Pull out all the relations of this type -db_multirow rels rels_select {} +db_multirow rels rels_select { + select v_inner.* + from (select r.rel_id, + acs_object.name(r.object_id_one) || ' and ' || acs_object.name(r.object_id_two) as name + from acs_rels r, app_group_distinct_rel_map m + where acs_permission.permission_p(r.rel_id, :user_id, 'read') + and r.rel_type = :rel_type + and m.rel_id = r.rel_id + and m.package_id = :package_id + order by lower(acs_object.name(r.object_id_one)), + lower(acs_object.name(r.object_id_two)) + ) v_inner + fetch first 26 rows only +} db_multirow attributes attributes_select {