Hey folks,
I'm knocking around a few ideas in my head and would like your input. Right now I have a webapp where users have various types of assets and resources (Videos, Collections, Direct Sales). We want to create a system where multiple users can be sharing the above mentioned resources.
I really like how github lets users become part of organizations, can switch context between their main account and organizations they are a part of. I want to implement this, somehow.
Since the above resources already point to a User object for write/read permissions, and request based filtering, I'm thinking that each organization will exist as a separate User in the database.
My current thought is to find a way to "toggle sessions" on the client side, so when a request is made, Django will treat the request as coming from the organization "User". Not sure how I would handle a user having different levels of permissions for an organization.
Maybe a custom middleware that places both the "real" user and the "acting" user on the request object?