Forum OpenACS Development: flexible permissions question

Collapse
Posted by Benjamin Brink on
Hello,

Let's suppose an app has two use cases for permissions.

1. standard:

set user_id \[ad_conn user_id\]
set instance_id \[ad_conn package_id\]

2. One instance where no data is shared between users, but admins have access to all users:

I'm guessing something like this case 2 is done in dotLRN where students only see their own work for certain package instances.

Is there an established api or technique used for a package to offer these two cases switchable via a parameter?

If so, which package would be a good example to follow?

If not, is there any reason (such as user_id package_id collisions) that code can't set the instance_id to user_id just for app data model ie data that doesn't touch openacs-core?

Ben

Collapse
Posted by Benjamin Brink on
Scratch this question. I'm going to try something different.