code: public Set<String> getAllConfiguredTenantNames() {
  
          final Settings roles = getRolesSettings();
  
          if (roles == null || roles.isEmpty()) {
              return Collections.emptySet();
          }
  
          final Set<String> configuredTenants = new HashSet<>();
          for (String sgRole : roles.names()) {
              Settings tenants = roles.getByPrefix(sgRole + ".tenants.");
  
              if (tenants != null) {
                  configuredTenants.addAll(tenants.names());
              }
  
          }
  
          return Collections.unmodifiableSet(configuredTenants);
      }
docs: /*public Map<String, Boolean> mapTenants00(final User user, Set<String> roles) {
  
  
  if(user == null) {
  return Collections.emptyMap();
  }
  
  final Map<String, Boolean> result = new HashMap<>();
  result.put(user.getName(), true);
  
  for(String sgRole: roles) {
  Settings tenants = getRolesSettings().getByPrefix(sgRole+".tenants.");
  
  if(tenants != null) {
  for(String tenant: tenants.names()) {
  
  if(tenant.equals(user.getName())) {
  continue;
  }
  
  if("RW".equalsIgnoreCase(tenants.get(tenant, "RO"))) {
  result.put(tenant, true);
  } else {
  if(!result.containsKey(tenant)) { //RW outperforms RO
  result.put(tenant, false);
  }
  }
  }
  }
  
  }
  
  return Collections.unmodifiableMap(result);
  }