Index: openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql 16 Feb 2008 18:52:19 -0000 1.7 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet-oracle.xql 26 Feb 2008 15:57:16 -0000 1.8 @@ -11,6 +11,7 @@ to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as cur_time, cf.package_id, p.instance_name as community_name, sc.node_id as comm_node_id, sa.node_id as as_node_id, a.anonymous_p, + acs_permission.permission_p(a.assessment_id,:user_id,'admin') as admin_p, (select count(*) from as_sessions s1, cr_revisions cr1 where s1.assessment_id=cr1.revision_id @@ -39,6 +40,10 @@ from as_assessment_section_map asm, as_item_section_map ism where asm.assessment_id = a.assessment_id and ism.section_id = asm.section_id) + and exists (select 1 from acs_object_party_privilege_map ppm + where ppm.object_id = a.assessment_id + and ppm.privilege = 'read' + and ppm.party_id = :user_id) order by lower(p.instance_name), lower(cr.title) ) q where (q.completed_p < q.number_tries) or (q.number_tries=0 or q.number_tries is null) Index: openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql 16 Feb 2008 18:52:20 -0000 1.14 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet-postgresql.xql 26 Feb 2008 15:57:16 -0000 1.15 @@ -12,6 +12,7 @@ to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as cur_time, cf.package_id, p.instance_name as community_name, sc.node_id as comm_node_id, sa.node_id as as_node_id, a.anonymous_p, + acs_permission__permission_p(a.assessment_id,:user_id,'admin') as admin_p, (select count(*) from as_sessions s1, cr_revisions cr1 where s1.assessment_id=cr1.revision_id @@ -30,7 +31,11 @@ site_nodes sa, site_nodes sc, apm_packages p, (select distinct asm.assessment_id from as_assessment_section_map asm, as_item_section_map ism - where ism.section_id = asm.section_id) s + where ism.section_id = asm.section_id + and exists (select 1 from acs_object_party_privilege_map ppm + where ppm.object_id = asm.assessment_id + and ppm.privilege = 'read' + and ppm.party_id = :user_id)) s where a.assessment_id = cr.revision_id and cr.revision_id = ci.latest_revision and ci.parent_id = cf.folder_id Index: openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 22 Feb 2008 23:42:53 -0000 1.14 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 26 Feb 2008 15:57:16 -0000 1.15 @@ -101,10 +101,7 @@ } else { set status untaken } - set admin_p [permission::permission_p -object_id $assessment_id -privilege admin] - if {[permission::permission_p -object_id $assessment_id -privilege read]} { - template::multirow append assessments $assessment_id $title $description $assessment_url $community_url $community_name $anonymous_p $in_progress_p $completed_p $status $number_tries $admin_p - } + template::multirow append assessments $assessment_id $title $description $assessment_url $community_url $community_name $anonymous_p $in_progress_p $completed_p $status $number_tries $admin_p } Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet-postgresql.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet-postgresql.xql 16 Feb 2008 19:06:36 -0000 1.5 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet-postgresql.xql 26 Feb 2008 16:00:15 -0000 1.6 @@ -20,7 +20,8 @@ tree_level(dotlrn_communities_all.tree_sortkey) as tree_level, coalesce((select tree_level(dotlrn_community_types.tree_sortkey) from dotlrn_community_types - where dotlrn_community_types.community_type = dotlrn_communities_all.community_type), 0) as community_type_level + where dotlrn_community_types.community_type = dotlrn_communities_all.community_type), 0) as community_type_level, + acs_permission__permission_p(dotlrn_communities_all.community_id, :user_id, 'admin') as admin_p from dotlrn_communities_all, dotlrn_member_rels_approved where dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 16 Feb 2008 19:06:36 -0000 1.17 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 26 Feb 2008 16:00:06 -0000 1.18 @@ -60,8 +60,7 @@ set comm_type "" set old_depth 0 set depth 0 -db_multirow -extend {admin_p intra_type_ul_tags previous_type_ul_tags} communities select_communities {} { - set admin_p [permission::permission_p -object_id $community_id -privilege admin] +db_multirow -extend {intra_type_ul_tags previous_type_ul_tags} communities select_communities {} { set intra_type_ul_tags "" set previous_type_ul_tags "" set new_type_p 0