Lun 1563

Make sure the length of the auto-generated site permissions do not exceed the maximum length of the DB field.