In fact, in versions 1.8 and 1.9 it is enough to simply add this functionality without prejudice to existing and new projects. Simple patch, nothing affects, the test passes.
So, as I said at the beginning - this change does not affect the admin panel.
access = is_stuff and True in (add_perm, change_perm, delete_perm)--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/39249ee0-b10b-4ee9-b7bb-ee8aac39e374%40googlegroups.com.
"view" absolutly not affect to the admin panel, just as do not affect to it other custom permissions.
Don't think of it as the permissions for the admin.
P.S.: Who would want to use "view" in contrib.auth - do it youself. It will be very easy.
# Add to conf.global_settings.py
...
AUTH_DEFAULT_PERMISSIONS = ('add', 'change', 'delete')
...
# And in db.models.options.py
@python_2_unicode_compatible
class Options(object):
...
def __init__(self, meta, app_label=None):
...
self.default_permissions = settings.AUTH_DEFAULT_PERMISSIONS
...
CUSTOM_DEFAULT_PERMISSIONS = ()
...
# And add in db.models.options.py
def get_full_default_permissions():
perms = ['add', 'change', 'delete']
perms.extend([ x for x in settings.CUSTOM_DEFAULT_PERMISSIONS if not x in perms ]) return perms
@python_2_unicode_compatible
class Options(object):
...
def __init__(self, meta, app_label=None):
...
self.default_permissions = get_full_default_permissions()
...