[BISERVER-10626] Error assigning permissions when roles have hyphens on their name

Cherry-pick from master