docs: protected List<IPortalDataType> getAllowedTypes(
              PortletRequest request, String activityName, Iterable<IPortalDataType> dataTypes) {
  
          // get the authorization principal representing the current user
          final HttpServletRequest httpServletRequest =
                  this.portalRequestUtils.getPortletHttpRequest(request);
          final IPerson person = personManager.getPerson(httpServletRequest);
          final EntityIdentifier ei = person.getEntityIdentifier();
          final IAuthorizationPrincipal ap =
                  AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());
  
          // filter the list of configured import/export types by user permission
          final List<IPortalDataType> results = new ArrayList<IPortalDataType>();
          for (IPortalDataType type : dataTypes) {
              final String typeId = type.getTypeId();
              if (ap.hasPermission(IPermission.PORTAL_SYSTEM, activityName, typeId)) {
                  results.add(type);
              }
          }
  
          return results;
      }