Forum OpenACS Q&A: What's my context?

Collapse
Posted by Sean Redmond on
Sometimes I'd like to distinguish between site-wide admin permissions
and "regular" permissions. For example, as site-wide admin everybody
else's calendar shows up on the page for my calendar and I'd like not
to see them or separate them out somehow.

Is there a way to find out not whether you have a particular pemission
but in what context you have it? I guess I'm thinking of a version of
ad_permission_p that doesn't return true or false but returns the
context_id that gives you whichever permission you are checking. If it
doesn't exist it seems as simple as copying ad_permission_p and just
modifying what it returns.

Thanks.