Well, without the structure of tables, it's
a bit theorical, but ... :
SELECT object_id
FROM rel_object_agent
WHERE agent_id='$agent_id';
This will give you the complete list of objects
this particular user is able to access.
The same goes for group of users (using
a second query after the first one)
SELECT object_id
FROM rel_object_group
WHERE group_id='$group_id';
and at first you need to get the group(s)
that specific agent is in :
SELECT group_id
FROM rel_agent_group
WHERE agent_id='$agent_id';
so you have a list of group_id to use in
the second request above
regards,
Hervé.