appstore icon indicating copy to clipboard operation
appstore copied to clipboard

User accounts and profiles for organizations

Open janikarki opened this issue 9 years ago • 0 comments

An organization may want to release their apps under their own name and branding, and not under the name of an individual developer. They may also want to have a profile page. However, the profile of an organization probably looks different from that of an individual, e.g. an organization does not have a first name and a last name.

We essentially get two kinds of users. We may do any of the following:

  • Ignore one or the other type of user.
  • Go for generic user profiles that are applicable to both.
  • Separate user types or user profile types.

One method of accomplishing an explicit distinction could be to associate all users with a PersonProfile or an OrganizationProfile (extended from UserProfile), depending on what they want to be. These would then hold the unique fields that are relevant for the type of user. At the basic level, you could then do things like

>>> print(person.type)
person  
>>> print(person.profile.name)
Obi-Wan Kenobi    
>>> print(person.profile.first_name)
Obi-Wan
>>> print(person.profile.occupation)
Jedi
>>> print(org.type)
organization
>>> print(org.profile.name)
Business Inc.
>>> print(org.profile.org_type)
Evil Corporation

janikarki avatar Jul 09 '16 10:07 janikarki