From d8402a4c9c84cf0b4472a033eb236e0a1272cecc Mon Sep 17 00:00:00 2001 From: Petar Hristov Date: Wed, 26 May 2021 11:39:17 +0200 Subject: [PATCH 1/2] Fix: Dependency of Coscine.Metadata (coscine/issues#1545) --- src/STS/STS.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/STS/STS.csproj b/src/STS/STS.csproj index 22d1045..812c1ff 100644 --- a/src/STS/STS.csproj +++ b/src/STS/STS.csproj @@ -1,4 +1,4 @@ - + full Coscine.Api.STS @@ -20,7 +20,7 @@ - + -- GitLab From 90fb0596b0f87a22fd93fce09d0ffafebd8696f6 Mon Sep 17 00:00:00 2001 From: Petar Hristov Date: Thu, 27 May 2021 11:25:50 +0200 Subject: [PATCH 2/2] Fix: Conditional methods adjusted (coscine/issues#1545) --- src/STS/Controllers/ShibbolethController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/STS/Controllers/ShibbolethController.cs b/src/STS/Controllers/ShibbolethController.cs index 22e8781..065ace0 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); -- GitLab