code: public static boolean isAdmin(IPerson p) {
          IAuthorizationPrincipal iap =
                  AuthorizationServiceFacade.instance()
                          .newPrincipal(
                                  p.getEntityIdentifier().getKey(),
                                  p.getEntityIdentifier().getType());
  
          return isAdmin(iap);
      }
docs: Determines if the passed-in IPerson represents a user that is a member of the administrator
  group or any of its sub groups.
  
  @param p
  @return