Forum OpenACS Q&A: Re: How to integrate an existing application package with dotLRN

Malte,

to find out if you are in a community you can use

dotlrn_community::get_community_id

which either returns nothing or the community id.

Since the dotLRN roles have (from what I understand) nothing to do with the permission system you need to query for the role or rel_type of the person and limit the access.


select dotlrn_member_rels_approved.rel_type,
dotlrn_member_rels_approved.role
from
dotlrn_member_rels_approved
where dotlrn_member_rels_approved.community_id = :community_id
and dotlrn_member_rels_approved.user_id = :user_id