Lun 1563

Make sure the length of the auto-generated site permissions do not exceed the maximum length of the DB field.
If your role name is bigger or equal in length to site_perm_max_len than because Group names are unique this method would break for having more than one site. It would also break if the name is smaller but you have multiple sites that begin with the same sequence of characters.

Maybe compute the name as {role_id}-{site_id}-{trimmed role_name}-{trimmed site_domain}

This way you can ensure group name uniqueness.


'