Lun 1563

Make sure the length of the auto-generated site permissions do not exceed the maximum length of the DB field.
I think you should add some tests for this.