On 10/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
SELECT id, (SELECT allowed FROM rights WHERE user_id = 1 AND ( (firm_id = projects.firm_id AND project_id = projects.id ANDsubproject_id IS NULL) OR (firm_id =
projects.firm_id AND project_id IS NULL))ORDER BY firm_
Hello tv,
I think in your case the PostgreSQL array column type really fits
well. I would just add an array of type integer (or whatever your
primary key in your role table is) to your company, project, module,
... tables. Then you can easy check if a role has access to the
project row by checkin