Depends on the aircraft as well. In commercial world then there's very little a pilot is allowed to do and is well detailed in the MEL (minimum equipment list). However if it's a homebuilt, well the pilot built it so i'm pretty sure he/she's allowed to do quite a bit to repair it.