Ride when healed
First you need to be off narcotics.
Second you should wait til your swelling is down to almost normal.
Third, your wound needs to be healed. If you lean on your leg too soon with the weight of your harley, the tissue many still be held together by the internal stitches and you may split open your wound. 6-8 weeks is probably getting close to being safe on the wound strength issue. I ride myself.