code: public boolean isSuperAdmin(UserIdentityContext userIdentityContext) {
          //SuperAdmin Account is the one the is
          //1. Has no parent, this is the top account
          //2. Is ACTIVE
          return (userIdentityContext.getEffectiveAccount().getParentSid() == null)
                  && (userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status.ACTIVE));
      }
docs: Checks if the effective account is a super account (top level account)
  @param userIdentityContext
  @return