Lun 1563

Make sure the length of the auto-generated site permissions do not exceed the maximum length of the DB field.
I'm still not understanding the entire auth system (I'm reverse engineering it now), but the more I look the more I see that the auth_group.name is redundant! You have the name in the cms_roles.role table. You have the site in the django_site table. What we need is a concatenated primary key, composed of site_id and role_id. In the best case you could have a **calculated column** in place of the name (if really needed, but it's doubtful you need to store any name in this table).

The benefit of having a concatenated primary key is that whenever you make a search:
1. the logic for the query is very simple
2. the execution plan == index search instead of full table scan. Now we have full table scan when we search by name.
3. you don't have to perform any update on domain OR role name change.

I'll probably implement this in another ticket if I consider it's a good idea (for the moment I'm not sure about the rest of the models + logic)