InstallHandler is the interface you implement for a post-install script in a managed package. Per the docs:
It runs as a special system user that represents your package, so all operations performed by the script appear to be done by your package. You can access this user by using UserInfo.
I just added some functionality to a previously working install script to populate a new custom field the package installs against Lead, but unexpectedly got
System.QueryException: sObject type 'Lead' is not supported.
when it ran as part of the InstallHandler. When the same code is executed in the target org by a normal user it runs fine.
I'm theorizing that this "special system user" has a limited set of permissions, and although I've worked around it for now I'd like to know what other limitation it has so I can avoid them. I can't find any docs on this though. Anyone know more than what's on the docs page above?