Django

Code

Ticket #3011 (assigned)

Opened 3 years ago

Last modified 3 weeks ago

Allow for extendable auth_user module

Reported by: nowell strite Assigned to: seocam (accepted)
Milestone: Component: Contrib apps
Version: Keywords: auth_user
Cc: say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com, danfairs, miracle2k Triage Stage: Accepted
Has patch: 1 Needs documentation: 1
Needs tests: 1 Patch needs improvement: 1

Description

I have been using the AUTH_PROFILE_MODULE setting paired with the get_profile() feature of the Django auth system and have run into many cases where it would be nice to directly access extra arbitrary user information without having to call get_profile() for each record.

I have patched my Django installation (with the attached .diff) to allow the developer to provide their own auth_user module, with the requirement that any developer created user model contains the base fields provided by the default auth_user model. This not only allows you to continue to use the build-in Django admin modules that rely on the auth_user system, but it allows you to store information like a users address, or override the username field to accept emails, etc.

My solution to this problem involves a few things

  • Adding a settings AUTH_USER_MODULE that specifies the path to the custom auth_user model. (i.e. 'myproj.apps.users.models.User')
  • Moving the existing User class out of the ./django/contrib/auth/models.py into a subdirectory './django/contrib/auth/users/models.py' that will not automatically be registered as a model when someone adds the 'django.contrib.auth' module to their INSTALLED_APPS. The AUTH_USER_MODULE setting in global settings points to this class by default 'django.contrib.auth.users.models.DefaultUser'
  • Creating a UserTemplate class that every user auth system must inherit from. This ensures that the default functions (like check_password, has_permission, etc.) are available (all of which can be overridden in the custom User class.

Attachments

auth_user_module.diff (8.1 kB) - added by nowell strite on 11/09/06 22:13:22.
auth_user_module patch
auth_user_module2.diff (8.1 kB) - added by nowell strite on 11/09/06 22:21:34.
updated patch, fixes typo in previous file
auth_user_module3.diff (8.7 kB) - added by nowell strite on 11/10/06 00:34:41.
Bugfix: This version plays nicely with syncdb and works with the django.db.models.loading.get_model(....)
3011.diff (8.6 kB) - added by Gary Wilson <gary.wilson@gmail.com> on 02/07/07 00:20:37.
patch against [4462]
3011.2.diff (6.5 kB) - added by Densetsu no Ero-sennin <densetsu.no.ero.sennin@gmail.com> on 08/29/07 15:08:43.
patch against [6023]
3011.3.diff (6.5 kB) - added by Densetsu no Ero-sennin <densetsu.no.ero.sennin@gmail.com> on 08/29/07 15:18:11.
oh sorry, my previous patch was against newforms-admin branch, here's the patch against trunk [6023]
3011.4.diff (9.6 kB) - added by Michael Richardson <michael@gobyairship.com> on 07/02/08 13:48:57.
Brought proposed patch up to trunk and moved some methods around; added stub documentation.
3011.5.diff (15.5 kB) - added by Michael Richardson <michael@gobyairship.com> on 07/02/08 13:50:36.
Last patch didn't include django/contrib/auth/default_user.py, which is where the, er, well, default user lives. Kind of important.
3011.6.diff (15.7 kB) - added by Michael Richardson <michael@gobyairship.com> on 07/03/08 14:17:04.
Patch against [7832] and added a quick fix so that apps like contenttypes wouldn't think that the imported module was part of contrib.auth.
3011.7.diff (18.1 kB) - added by hvendelbo on 09/17/08 12:06:23.
Nearly there
3011-r10115.diff (2.9 kB) - added by seocam on 03/22/09 13:54:26.
New patch against the trunk [10115]

Change History

11/09/06 22:12:50 changed by anonymous

  • type changed from defect to enhancement.

11/09/06 22:13:22 changed by nowell strite

  • attachment auth_user_module.diff added.

auth_user_module patch

11/09/06 22:21:34 changed by nowell strite

  • attachment auth_user_module2.diff added.

updated patch, fixes typo in previous file

11/10/06 00:34:41 changed by nowell strite

  • attachment auth_user_module3.diff added.

Bugfix: This version plays nicely with syncdb and works with the django.db.models.loading.get_model(....)

01/17/07 16:12:17 changed by

  • milestone deleted.

Milestone Version 1.0 deleted

01/30/07 16:33:39 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch set to 1.
  • has_patch set to 1.
  • stage changed from Unreviewed to Accepted.
  • needs_tests set to 1.
  • needs_docs set to 1.

Cool, I didn't know this ticket existed. This was something I have been wanting to do but never found the time.

Thanks for the patch, I think you are headed in the right direction. I would say most of the existing methods that were left in UserTemplate? should move along with the User model though. Take set_password for example, this would only work for a user model with a password attribute. By default, set_password should do nothing. Other methods like get_absolute_url and is_authenticated could stay since they would be sensible defaults the way they exist now.

Marking this as accepted as this has been a highly desired feature for quite a while.

02/07/07 00:20:37 changed by Gary Wilson <gary.wilson@gmail.com>

  • attachment 3011.diff added.

patch against [4462]

03/13/07 00:52:12 changed by Gary Wilson <gary.wilson@gmail.com>

#3669 marked as a duplicate, and has some other ideas.

08/29/07 13:20:14 changed by anonymous

  • cc set to densetsu.no.ero.sennin@gmail.com.

08/29/07 15:08:43 changed by Densetsu no Ero-sennin <densetsu.no.ero.sennin@gmail.com>

  • attachment 3011.2.diff added.

patch against [6023]

08/29/07 15:18:11 changed by Densetsu no Ero-sennin <densetsu.no.ero.sennin@gmail.com>

  • attachment 3011.3.diff added.

oh sorry, my previous patch was against newforms-admin branch, here's the patch against trunk [6023]

10/08/07 19:41:54 changed by esaj

+1 on adding this feature.

01/25/08 22:29:21 changed by Simon Litchfield <simon@quo.com.au>

  • cc changed from densetsu.no.ero.sennin@gmail.com to simon@quo.com.au, densetsu.no.ero.sennin@gmail.com.

Email, rather than username, certainly seems to be the standard these days for web authentication. Problem is, the User model only gives us a 30 character primary key field to work with.

I'm a big +1 for any improvement that would allow us to easily use our own model in place of the User model.

05/14/08 16:12:36 changed by michael@gobyairship.com

  • cc changed from simon@quo.com.au, densetsu.no.ero.sennin@gmail.com to michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com.

I'm +1 on this. It would be extremely useful to have custom user models especially when dealing with things like openid.

05/23/08 17:56:41 changed by Rob Hudson <treborhudson@gmail.com>

  • cc changed from michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com to michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com.

+1. This would be great. What does it need to be included? Tests? Docs? How can we help?

06/28/08 04:59:20 changed by mrts

  • milestone set to 1.0.

Looks to be in scope for 1.0.

07/02/08 02:34:41 changed by David Danier <goliath.mailinglist@gmx.de>

  • cc changed from michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com to michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de.

Funny I found this ticket (again). This is something I wanted to add to django for ages now, but going an rather radical approach. Instead of just being able to plug another User-model in I decided it would be nice to create a modular auth-framework, which lets you replace the permission-system as well, as I think "auth" are two parts: AUTHentication (who is requesting a page) and AUTHorization (may he request that page).

I filed a bug about this, too (#3669)...but it got closed (duplicate of this here). So - because it looks like things are getting forward here - I just wanted to get some discussion up again about this.

What do you think about going one step further and also create a modular permission system? What I implemeneted so far is a simple hook-system, using some ideas of the generic-auth-branch.

Would it be possible to make it a user-choice to include (or exclude) thinks like the existing permission, group and message-models in auth or even replace this parts, too?

Perhaps there can be shared some code or ideas? Some outdated code is available at https://svn.webmasterpro.de/django-auth-rewrite/

Anyway, I'm +1 for getting this integrated of course. ;-)

07/02/08 04:36:04 changed by emulbreh

+1

I'd like abstract models for permissions, groups and the admin stuff (is_superuser, is_staff, ..). Don't require any particular fields (auth backends may provide suitable mixins).

Something like the following would then be equivalent to the current User implementation:

from django.contrib.admin import AdminUserMixin
from django.contrib.authorization import UserWithGroupMixin, UserWithPermissionsMixin
from django.contrib.auth.backends.model import ModelBackendUserMixin

class User(UserWithPermissionsMixin, UserWithGroupMixin, AdminUserMixin, ModelBackendUserMixin):
    first_name = models.CharField(_('first name'), max_length=30, blank=True)
    last_name = models.CharField(_('last name'), max_length=30, blank=True)
    email = models.EmailField(_('e-mail address'), blank=True)
    last_login = models.DateTimeField(_('last login'), default=datetime.datetime.now)
    date_joined = models.DateTimeField(_('date joined'), default=datetime.datetime.now)
    ...

(Not thought through: ModelBackendUserMixin could be a factory: class User(ModelBackendUserMixin(identity='email', password='password')), or would a metaclass solution be nicer ..)

07/02/08 11:33:04 changed by piranha

  • cc changed from michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de to michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua.

07/02/08 13:48:57 changed by Michael Richardson <michael@gobyairship.com>

  • attachment 3011.4.diff added.

Brought proposed patch up to trunk and moved some methods around; added stub documentation.

07/02/08 13:50:36 changed by Michael Richardson <michael@gobyairship.com>

  • attachment 3011.5.diff added.

Last patch didn't include django/contrib/auth/default_user.py, which is where the, er, well, default user lives. Kind of important.

07/03/08 08:37:00 changed by gwilson

  • milestone deleted.

An enhancement, not 1.0.

07/03/08 11:43:02 changed by anonymous

  • cc changed from michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua to michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com.

07/03/08 14:17:04 changed by Michael Richardson <michael@gobyairship.com>

  • attachment 3011.6.diff added.

Patch against [7832] and added a quick fix so that apps like contenttypes wouldn't think that the imported module was part of contrib.auth.

07/03/08 14:21:03 changed by Michael Richardson <michael@gobyairship.com>

So there are several major issues here, probably the largest being how we can make this integrate with the admin interface (perhaps we should be doing this on newforms-admin?) and current generic apps.

I would like to find a way to make it dynamic rather than just saying, "Oh, you're using your own user model, sorry you're SOL if you want to use this and this and this."

I'm also in now way sure that the current method of doing it is the proper one, but now that the diff is current we can at least figure out where to go from here.

Anybody volunteering or have any ideas?

07/03/08 14:56:05 changed by anonymous

  • cc changed from michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com.

07/03/08 16:04:09 changed by Rob Hudson <treborhudson@gmail.com>

I like the idea of duck typing. If your provided user model has x, y, and z fields or properties, and X, Y, and Z methods, then the default admin and other apps will accept it and use it as if it were the default. That way, if you want your own model to be used by the admin, you make sure those properties and methods are available and work. We can even provide an AuthUserTemplate? that have stubs that raise a NotImplementedError?. (I don't know what you normally do for the properties though.) Similar to how the HttpResponse method has checks for _is_string, I can imagine that the user module loading mechanism checks these properties and fields and adds a _is_auth (or something) that the various other subsystems can check against.

07/04/08 04:36:54 changed by David Danier <goliath.mailinglist@gmx.de>

So, this one will get a little shorter, I way right through with my comment when firefox crashed...great.

What I did, when trying to solve this (see #comment:11) was to strip down django.contrib.auth to only provide some generic API for all common auth-related stuff. So django.contrib.auth would only provide some API, which functions/methods just wraping the real functions/methods provided by the module(s) defined in django.settings. Additionally I was able to split the rest of django.contrib.auth into separate applications, so django got independent modules for users (auth_user) and permissions (auth_model_perm), but is not limited to this applications (for example groups could get its own application or the whole auth-backends-system could get its own user-application, removing the need of supporting backends in the main auth_user-application). Users could then use the django-users in combination with some self-written permission-system (supporting object-level-permissions for example), or do it the other way round (thats what the current patch provides).

However my code was never ready and did not solve every problem, first of all when dealing with backwards compability. I tried to set sane defaults (current applications as default selected modules) and provide support for old code, like imports (from django.contrib.auth.models import User), but thats only the tip of the iceberg.

But I think the direction my approach went was not all bad, it provided the developer with an API for all auth-related stuff and supported him with sane defauls (thats what the current auth-application does). Anyway someone could replace this with its own implementation while keeping third-party applications supported (google code lists many projects, many of them use django.contrib.auth some way), even for permission tasks (thats something generic-auth tried to solve).

Of course there needs to be some work done to provide some defaults (e.g. users should at least be displayable in templates using {{ user|escape }}), but not everything is really needed. For example the message-system is nice, but most applications won't use it. Perhaps a cleanup of the auth-application could make this optional and provide some simple way to test for message-support in third-party-applications (if hasattr(request.user, 'send_message')?). But that would be post-1.0. ;-)
(And btw: I really like the idea of using mixins here)

07/09/08 05:17:36 changed by anonymous

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info.

08/04/08 07:27:07 changed by marinho

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho.

08/29/08 09:42:40 changed by hvendelbo

patch number 6 won't work if you don't override the user model. I guess it needs to conditionally delete the entry.

08/29/08 11:11:36 changed by hvendelbo

might also want to set the table name on the default user to auth_user

08/31/08 10:12:16 changed by Uninen

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net.

09/04/08 07:39:38 changed by hvendelbo

My current change includes making UserTemplate? abstract, and setting db_table = "auth_user" on DefaultUser?. This should ensure that this patch doesn't change default installation table names. I haven't verified that yet though.

09/06/08 11:06:09 changed by anonymous

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com.

09/15/08 13:14:15 changed by david

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com.

09/16/08 07:30:51 changed by dan

  • owner changed from nobody to dan.
  • status changed from new to assigned.

This is great. Just what I've been looking for. Can we change the name of the settings variable, though? I think good naming is really important, and calling it AUTH_USER_MODULE when it doesn't name a module is a bad idea. Can we call it AUTH_USER_MODEL instead?

09/16/08 07:32:36 changed by dan

Uh oh... I just submitted a comment and left everything else set to the defaults, which appears to have inadvertently changed the ticket state. Can someone undo that?

09/16/08 07:33:49 changed by dan

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org.

09/17/08 12:06:23 changed by hvendelbo

  • attachment 3011.7.diff added.

Nearly there

09/17/08 13:09:07 changed by wayla

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com.

09/17/08 13:09:46 changed by aalbrecht

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com.

09/18/08 00:19:59 changed by darkpixel

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com.

10/06/08 21:44:22 changed by anonymous

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com.

10/16/08 07:24:50 changed by anonymous

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com.

10/16/08 20:33:41 changed by adunar

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com.

10/26/08 03:47:45 changed by david

After reviewing your patch, I just wonder why don't you put default fields and methods in the abstract TemplateUser? class? This way, you don't have to copy/paste most of the content of User class in your custom one and you can still override some of them with your own if you want. Make sense?

ps: maybe AbstractUser? is more descriptive than TemplateUser??

11/04/08 20:58:42 changed by siddhi

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com.

(follow-up: ↓ 40 ) 11/21/08 23:09:29 changed by cornbread

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc.

I'd like to see #3400, and #9463 in with this. For sorting and filtering user data across the user profile field.

(in reply to: ↑ 39 ) 11/24/08 06:18:32 changed by HM

Replying to cornbread:

I'd like to see #3400, and #9463 in with this. For sorting and filtering user data across the user profile field.

With extendable User-models, profile-models are no longer needed making #9463 redundant.

11/27/08 02:58:32 changed by david

Too bad that it has been rejected for "too many potential downsides" from 1.1 roadmap http://code.djangoproject.com/wiki/Version1.1Features

What's the status of the latest patch? Is there somebody still active on this feature?

(follow-up: ↓ 43 ) 11/27/08 05:44:33 changed by HM

Strange development, that. I thought I was paying close attention to the 1.1 process, this feature getting +0 and then one -1 so I expected it to be deferred. I can't find any list of the many potential downsides anywhere, and the comment to the guy who set it -1 seemed like a comment to a -0-feature so I thought it was just a goof...

The "many potential downsides" ought to be listed here, anyway.

(in reply to: ↑ 42 ; follow-up: ↓ 44 ) 11/27/08 05:59:39 changed by HM

Replying to HM:

Strange development, that. I thought I was paying close attention to the 1.1 process, this feature getting +0 and then one -1 so I expected it to be deferred.

More than one -1 now (from http://spreadsheets.google.com/ccc?key=pSqnCvef6OXmGWQ9qbEVMeA):

  • AH: Any sort of framework-in-the-framework like this makes me suspicious, and the implementation and design would have to be incredibly solid.
  • JB: Doesn't affect me one way or another.

There's also one +1, from GW.

But from this to "too many potential downsides"? *scratches head*

(in reply to: ↑ 43 ) 11/27/08 09:16:10 changed by ramiro

Replying to HM:

But from this to "too many potential downsides"? *scratches head*

You might want to take a look at this #django-dev IRC channel log for a related discussion: http://oebfare.com/logger/django-dev/2008/11/25/1/#17:32-977590

(follow-up: ↓ 48 ) 03/15/09 09:52:41 changed by wkornewald

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald.

So, what's going to happen with this ticket? It's on the list of ideas for Summer of Code 2009.

We really need this feature and we'd like to have an officially supported API for this. Django's default user comes with first_name and last_name which is too specific for us. We only have full_name and calculated @property for first_name and last_name. Also, we don't have usernames. In a lot of cases email is sufficient, so why should the user bother about inventing a username? Of course, this means that in our case email should be a required and unique field.

Moreover, code that uses get_profile() is just more annoying to write and you have to call select_related(). It's much easier to have all user fields in the User model. Our code has definitely become easier to work with since we eliminated the profile model and put everything into the User.

In our app-engine-patch project (a Django port to App Engine) we have something similar: http://code.google.com/p/app-engine-patch/wiki/CustomUserModel

We also allow for overriding the AnonymousUser? (which sometimes needs additional attributes, too).

Now that I think about it, the AUTH_ADMIN_MODULE stuff isn't necessary because you can easily register this in some other app's admin.py.

03/15/09 10:10:03 changed by Alex

One thing I'll note for this is that with the new managed option it's very easy to make these pure python changes in your own code.

03/15/09 11:21:43 changed by wkornewald

And how would I replace the User model using that managed option without modifying the auth app?

(in reply to: ↑ 45 ; follow-up: ↓ 49 ) 03/15/09 13:06:38 changed by David Danier <goliath.mailinglist@gmx.de>

Replying to wkornewald:

We really need this feature and we'd like to have an officially supported API for this. Django's default user comes with first_name and last_name which is too specific for us. We only have full_name and calculated @property for first_name and last_name. Also, we don't have usernames. In a lot of cases email is sufficient, so why should the user bother about inventing a username? Of course, this means that in our case email should be a required and unique field. Moreover, code that uses get_profile() is just more annoying to write and you have to call select_related(). It's much easier to have all user fields in the User model. Our code has definitely become easier to work with since we eliminated the profile model and put everything into the User.

There are more fundamental flaws in the current approach. For example one might need to have AnonymousUser? saved in the database, which normalized the way permission control works (permissions for the AnonymousUser? can be saved to the database).

One bit problem I see with the current contrib.auth-module is, that it combines different things. There is no need to put code for authorization (who is accessing the page?) and authentication (is someone allowed to access something?) into the same app. I would prefer having these things in different applications so they could be replaced separately. contrib.auth could provide some kind of generic API for accessing these new applications. Having all of these different apps combined in contrib.auth makes redesigning these thing much more complicated. Perhaps a first step might be creating independent apps here.

(in reply to: ↑ 48 ) 03/15/09 14:31:45 changed by wkornewald

Replying to David Danier <goliath.mailinglist@gmx.de>:

There are more fundamental flaws in the current approach. For example one might need to have AnonymousUser? saved in the database, which normalized the way permission control works (permissions for the AnonymousUser? can be saved to the database). One bit problem I see with the current contrib.auth-module is, that it combines different things. There is no need to put code for authorization (who is accessing the page?) and authentication (is someone allowed to access something?) into the same app. I would prefer having these things in different applications so they could be replaced separately. contrib.auth could provide some kind of generic API for accessing these new applications. Having all of these different apps combined in contrib.auth makes redesigning these thing much more complicated. Perhaps a first step might be creating independent apps here.

I like that. Moving out the permission system would also be very useful for an App Engine port because the current Permission model complicates queries unnecessarily. You can as well just store a string like "auth.can_delete" (or a whole list of such strings) which allows for much more efficient querying on non-relational DBs. This works very well in app-engine-patch.

03/15/09 16:51:58 changed by mtredinnick

Design discussion in bug tickets is a really bad place, since you won't reach the right audience. We have a mailing list (django-dev) for that, please use it. be aware, though, that now (as we're entering the push to get 1.1 out the door) is not a great time for getting a lot of attention on new designs, so be prepared to raise it again in the ealry 1.2 period.

(follow-up: ↓ 52 ) 03/19/09 17:16:12 changed by david

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, larlet@gmail.com, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald to osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald.

What about the new proxy Meta attribute? Did someone try to extends a User for real with it? http://docs.djangoproject.com/en/dev/topics/db/models/#proxy-models

(in reply to: ↑ 51 ) 03/20/09 02:13:49 changed by David Danier <goliath.mailinglist@gmx.de>

Replying to david:

What about the new proxy Meta attribute?

I think this may help with some of the problems described here, at least some of the problems that are avoidable in pure python. Many of these things can be worked around using the advantages a dynamic language like python provides, too. For example someone could just import User and then do somethink like:

User.my_new_method = lambda self: self.something_i_want_to_do_here

This may not be as clean as using some proxy-class, but works fine and has the advantage of not needing to import some "other" user.

As said above I see more fundamental flaws in current contrib.auth. One might be that you have no clean way to replace AnonymousUser? (and put it into the database for example). Another is the combination of four or five different applications into contrib.auth (authentication, authorization, groups, messages, permissions) which goes against everything you try to teach new django-users when creating applications and makes creation of new applications for only parts of this more complicated.

There are other tickets adressing some of these issues, see #4604 for example. You may also notice, that the current patch tries to put a combination of session and user-based messages into the template context. This really would not be necessary if you could just choose between two decoupled message-apps.

@mtredinnick: I'm not sure if restructuring the whole contrib.auth-app would be appropriate in 1.x anyway, so perhaps this is something that needs to be done for some 2.x-version. I will perhaps raise this issue on the mailinglist again, when 1.2 is released.

03/20/09 10:44:15 changed by bswenson

  • cc changed from osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald.

03/21/09 10:44:27 changed by gonz

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz.

03/22/09 13:54:26 changed by seocam

  • attachment 3011-r10115.diff added.

New patch against the trunk [10115]

(follow-up: ↓ 56 ) 03/22/09 14:04:05 changed by seocam

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam.
  • owner changed from dan to seocam.
  • status changed from assigned to new.

The patch above implements the UserTemplate? keeping the original User but using an abstract model. This implementation it's not so flexible but it keeps the compatibility with 1.0 versions. Even if this patch it's not what we are looking for I'd like to the this ticket.

(in reply to: ↑ 55 ; follow-up: ↓ 57 ) 03/22/09 14:06:22 changed by seocam

  • status changed from new to assigned.

Replying to seocam:

The patch above implements the UserTemplate? keeping the original User but using an abstract model. This implementation it's not so flexible but it keeps the compatibility with 1.0 versions. Even if this patch it's not what we are looking for I'd like to the this ticket.

to get this ticket*

(in reply to: ↑ 56 ; follow-up: ↓ 58 ) 03/22/09 15:58:12 changed by David Danier <goliath.mailinglist@gmx.de>

Replying to seocam:

Replying to seocam:

Even if this patch it's not what we are looking for I'd like to the this ticket.

to get this ticket*

I like to have some fix for this in Django, too....but I see one major downside on the approach of patching everything together to support these things: If you look at my proposal above you may agree, that - for example - having AUTH_BACKENDS is not neccessary to support different backends. One could just implement some kind of LdapUser?-Model (which only has fields, that are really needed for LDAP) and use this. You can say similar things about AUTH_PROFILE_MODULE, which would be not neccessary any more.

So perhaps instead of creating an continuous growing contrib.auth-module it would be a good idea to concentrate on replacing it by something that reduces the overall overhead (in code and management). For me it looks like currently many things get patched in whithout getting down to the real problems and by providing many half-ready solutions on the road down to a flexible authentication system.

Why half-ready? AUTH_PROFILE_MODULE is a good example here. You may use user.get_profile() to load the profile for a particular user. But there is no way to auto-create the profile for new users (like get_or_create()). So you have to write your own register-view to get this working, or use some other way to work around this (I think there is some closed ticket for this, too).

(in reply to: ↑ 57 ; follow-up: ↓ 60 ) 03/22/09 17:30:03 changed by seocam

I like to have some fix for this in Django, too....but I see one major downside on the approach of patching everything together to support these things: If you look at my proposal above you may agree, that - for example - having AUTH_BACKENDS is not neccessary to support different backends. One could just implement some kind of LdapUser?-Model (which only has fields, that are really needed for LDAP) and use this. You can say similar things about AUTH_PROFILE_MODULE, which would be not neccessary any more. So perhaps instead of creating an continuous growing contrib.auth-module it would be a good idea to concentrate on replacing it by something that reduces the overall overhead (in code and management). For me it looks like currently many things get patched in whithout getting down to the real problems and by providing many half-ready solutions on the road down to a flexible authentication system. Why half-ready? AUTH_PROFILE_MODULE is a good example here. You may use user.get_profile() to load the profile for a particular user. But there is no way to auto-create the profile for new users (like get_or_create()). So you have to write your own register-view to get this working, or use some other way to work around this (I think there is some closed ticket for this, too).

I agree that the AUTH_PROFILE_MODULE is a half-ready solution, and I know that the patch I'm proposing it's not a final solution as well, but I can't see any solution which don't break the backwards compatibility and would fix everything here.

Also add a feature that we already know it's going to be deprecated it's not a good idea either.

So the idea here is have a long term solution which provides more much flexibility. I'll try to create a draft spec based on what I've read until now, and as soon as a have something I'll send in the list.

03/23/09 00:32:10 changed by cornbread

I'd also love to see a username option with this. ie The ability to use the email as username.

(in reply to: ↑ 58 ; follow-up: ↓ 61 ) 03/23/09 02:16:58 changed by David Danier <goliath.mailinglist@gmx.de>

Replying to seocam:

... , but I can't see any solution which don't break the backwards compatibility and would fix everything here.

I would suggest adding some kind of contrib.newauth (like newforms) and keeping the old contrib.auth for some time (until 2.0?). One problem I see with this would be foreign keys, but perhaps we could provide some (hackish) workaround for this.

So the idea here is have a long term solution which provides more much flexibility. I'll try to create a draft spec based on what I've read until now, and as soon as a have something I'll send in the list.

Perhaps we could put up a wiki-page to work on this proposal. I would like to write down some ideas, too. ;-)

(in reply to: ↑ 60 ) 04/11/09 08:22:07 changed by hvendelbo

Replying to David Danier <goliath.mailinglist@gmx.de>:

I'm using the patch (might have tweaked it slightly), and without setting an override Django works as before. I'm just about to put the patch on GitHub? git://github.com/thepian/django.git I've been thinking that a general model override mechanism would be preferable, I'm not sure what the best approach would be. I'll be at Euro DjangoCon if you want to discuss this.

04/15/09 23:00:54 changed by alexkoshelev

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev.

04/16/09 10:28:35 changed by gonz

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev.

05/13/09 23:57:02 changed by sfllaw

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw.

07/08/09 06:01:50 changed by robin

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw to bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin.

07/13/09 05:05:34 changed by sayane

  • cc changed from bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin.

I'm waiting for it too ;-)

07/14/09 18:32:06 changed by ramusus

  • cc changed from say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com.

08/06/09 21:05:40 changed by veena

  • cc changed from say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz.

Maybe you can inspire in the API design of authentication and authorization module in Nette Framework. I think, it's designed enough abstract and with huge practical view http://api.nettephp.com/0.9/li_Nette-Security.html and http://api.nettephp.com/0.9/Nette-Web/User.html However, storage for credentials, permissions, user profile etc. is not implemented in this API. It could be in database or anywhere else.

08/20/09 11:04:11 changed by tinodb

  • cc changed from say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com.

09/04/09 17:08:48 changed by leond

*bump* Any new thoughts? The newauth-idea sounds good.

09/12/09 14:20:04 changed by HM

I use the function get_user_model() which reads from a setting what user-model to use. Then instead of

    from django.contrib.auth.models import User
    ...
    user = models.ForeignKey(User...

I do

    User = get_user_model()
    ...
    user = models.ForeignKey(User...

The apps using the user-model must not have conflicting needs of course, but we are after all using Python and are all consenting adults, right? No need for handcuffs and bullet-proof contracts.

01/24/10 06:05:55 changed by danfairs

  • cc changed from say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com, danfairs.

02/27/10 00:23:26 changed by anonymous

  • cc changed from say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com, danfairs to say4ne@gmail.com, bram@craniumisajar.com, mike.lopez@digiport.com, osborn.steven@gmail.com, michael@gobyairship.com, simon@quo.com.au, densetsu.no.ero.sennin@gmail.com, treborhudson@gmail.com, goliath.mailinglist@gmx.de, piranha@piranha.org.ua, hanne.moa@gmail.com, michal@salaban.info, marinho, ville@unessa.net, sylvaintersideral@gmail.com, david, dan@electricwords.org, waylan@gmail.com, albrecht.andi@gmail.com, django@darkpixel.com, nreilly@nreilly.com, tomasare@gmail.com, youngj@apture.com, siddhartag@hotmail.com, richard@cornbread.cc, wkornewald, gonz, seocam, alexkoshelev, sfllaw, robin, ramusus@gmail.com, stv@seznam.cz, tinodb@gmail.com, danfairs, miracle2k.

Add/Change #3011 (Allow for extendable auth_user module)




Change Properties
Action