Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/index.tcl 7 Aug 2017 23:47:58 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/constraints/index.tcl 3 Sep 2024 15:37:34 -0000 1.4 @@ -15,7 +15,17 @@ # Select out basic information about all the constraints on which the # user has read permission -db_multirow constraints select_rel_constraints {} +db_multirow constraints select_rel_constraints { + select c.constraint_id, c.constraint_name + from rel_constraints c + application_group_segments s1, application_group_segments s2 + where s1.segment_id = c.rel_segment + and s1.package_id = :package_id + and s2.segment_id = c.required_rel_segment + and s2.package_id = :package_id + and acs_permission.permission_p(c.constraint_id, :user_id, 'read') + order by lower(c.constraint_name) +} ad_return_template