Hi,

Yes, looking at the code, it appears that there's nothing preventing you 
from creating clashing custom permissions.

Ideally, the unique_together should be on ('content_type__app_name', 
'codename') if that's even possible.

Collin

On Friday, January 16, 2015 at 1:37:02 PM UTC-5, Torsten Bronger wrote:
>
> Hallöchen! 
>
> According to 
> <
> https://docs.djangoproject.com/en/1.7/ref/contrib/auth/#django.contrib.auth.models.User.has_perm>,
>  
>
> the permission is defined with "<app label>.<permission codename>". 
> However, the unique_together option says (('content_type', 
> 'codename'),).  So, in an app "foo", one could define a permission 
> codename "edit_bar" in two different models, and foo.edit_bar would 
> not be unique. 
>
> Does this mean I must take care myself that such name clashs don't 
> occur? 
>
> Tschö, 
> Torsten. 
>
> -- 
> Torsten Bronger    Jabber ID: torsten...@jabber.rwth-aachen.de 
> <javascript:> 
>                                   or http://bronger-jmp.appspot.com 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3252bcae-12a9-4db3-a297-28e61ce12c21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to