Skip to content
Snippets Groups Projects

Hotfix/1545 empty user graphs

Merged Petar Hristov requested to merge Hotfix/1545-emptyUserGraphs into master
2 files
+ 5
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -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);
Loading