In the new extensions documentation.
Determine the user type - administrator, reseller, or customer and restrict access basing on this type. This is accomplished by creating the pm_Session class instance and using its boolean methods
All through it you see references to classes you extend...