#10649: Permission to anonymous ---------------------------+------------------------------------------------ Reporter: niarium | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ Granting a permission to anonymous is needed.
The situation goes like this. You have a forum application, and, in the forum model, you have some {{{ForeignKey}}}s (to permission) that will correspond to the actions you can take in a forum, like reading writing listing and commenting. Some forums are supposed to be read and written by anonymous users. However, no matter what permission I assign for the reading action, the method {{{request.user.has_perm}}} always returns false if the user is not logged in. There are workarounds, one of them being that you give {{{null=true}}} and {{{blank=true}}} to those {{{ForeignKey}}}s and check whether they are {{{None}}} or not before calling {{{has_perm}}}. But then you need an extra line of code and will lose the consistency, treating anonymous permissions very specially. Trac (which the django project itself uses for development too) has permission to anonymous, making it easier to set actions to be taken by anonymous. It will be great for django to have that too. -- Ticket URL: <http://code.djangoproject.com/ticket/10649> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---