large queryset in get_perms

get_perms: added distinct, for unique "codename" in queryset.
![1365064063-clip-25kb](https://f.cloud.github.com/assets/734622/338227/dbb3adf4-9d06-11e2-8bb7-708617de11a4.png)