diff --git a/src/STS/Controllers/ShibbolethController.cs b/src/STS/Controllers/ShibbolethController.cs index 22e8781cfa6f1806dacfbb61866ca6cd4e189120..065ace040a7d3db786da12ffb18ca7325053a53a 100644 --- a/src/STS/Controllers/ShibbolethController.cs +++ b/src/STS/Controllers/ShibbolethController.cs @@ -89,10 +89,10 @@ namespace Coscine.Api.STS.Controllers _rdfStoreConnector.RemoveMembershipData(userGraphName, organization); // Reverse lookup... - var eduPersonScopedAffiliation = info.Principal.FindFirstValue(ShibbolethAttributeMapping.LabelMapping.FirstOrDefault(x => x.Value == "Entitlement").Key); - if (eduPersonScopedAffiliation.StartsWith("employee@") + var eduPersonScopedAffiliation = info.Principal.FindAll(ShibbolethAttributeMapping.LabelMapping.FirstOrDefault(x => x.Value == "Entitlement").Key); + if (eduPersonScopedAffiliation.Any(x => x.Value.StartsWith("employee@")) // Check for test shib (employee user is actually member...). - || (eduPersonScopedAffiliation.StartsWith("member@") && entityId == "https://login-test.rz.rwth-aachen.de/shibboleth")) + || (eduPersonScopedAffiliation.Any(x => x.Value.StartsWith("member@") && entityId == "https://login-test.rz.rwth-aachen.de/shibboleth"))) { // Add membership information. _rdfStoreConnector.AddMemebershipData(userGraphName, organization); diff --git a/src/STS/STS.csproj b/src/STS/STS.csproj index 22d10451ce620f0bb2b79e81c88e1227833d41f7..812c1ff65277f35f57181dbcb9aa39b67f9d8a57 100644 --- a/src/STS/STS.csproj +++ b/src/STS/STS.csproj @@ -1,4 +1,4 @@ - + full Coscine.Api.STS @@ -20,7 +20,7 @@ - +