Django User "per project" group assignation

Posted by Ben G on Stack Overflow See other posts from Stack Overflow or by Ben G
Published on 2010-06-04T13:40:07Z Indexed on 2010/06/07 9:12 UTC
Read the original article Hit count: 267

Hi, Here's my problem : my site has users, which can create projects, and access other user's projects. Each project can assign different rights to users.

So, i could have Project A : user "John" is in group "manager" , and Project "B" user "John" is in group "worker".

How could I use the Django User authentication model to do that ?

From a SQL point a view, what i would like is to be able to add "project_id" in the primary key for the "auth_user_groups" table.

I don't think profile is of any help here. Any advice ?

UPDATE : "worker" and "manager" are just two examples of the permission group (or "roles") that my application defines. There will be more in the future. Eg : i will probably also have "admin", "reporting", etc...

© Stack Overflow or respective owner

Related posts about database

Related posts about django