Commits (3)
......@@ -94,9 +94,9 @@ namespace Coscine.Api.STS.Controllers
_rdfStoreConnector.RemoveMembershipData(userGraphName, organization);
// Reverse lookup...
var eduPersonScopedAffiliation = info.Principal.FindAll(ShibbolethAttributeMapping.LabelMapping.FirstOrDefault(x => x.Value == "Entitlement").Key);
var eduPersonScopedAffiliation = info.Principal.FindAll(ShibbolethAttributeMapping.LabelMapping.FirstOrDefault(x => x.Value == "ScopedAffiliation").Key);
var orgFromId = _rdfStoreConnector.GetOrgnizationWithIdentifier(identifier);
if (eduPersonScopedAffiliation.Any(x => x.Value.StartsWith("employee@")))
if (eduPersonScopedAffiliation.Any(x => x.Value.StartsWith("employee@") || x.Value.StartsWith("staff@")))
{
// Add membership information.
_rdfStoreConnector.AddMemebershipData(userGraphName, organization);
......
......@@ -6,7 +6,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Version>2.4.2</Version></PropertyGroup>
<Version>2.4.3</Version></PropertyGroup>
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
<Company>IT Center, RWTH Aachen University</Company>
......
......@@ -17,7 +17,7 @@ namespace Coscine.Api.STS.Utils
{ "urn:oid:2.5.4.4", "Surname" },
{ "urn:oid:1.3.6.1.4.1.5540.2.1.96", "Givenname" },
{ "urn:oid:0.9.2342.19200300.100.1.3", "EmailAddress" },
{ "urn:oid:1.3.6.1.4.1.5923.1.1.1.9", "Entitlement" },
{ "urn:oid:1.3.6.1.4.1.5923.1.1.1.9", "ScopedAffiliation" },
{ "urn:oid:2.5.4.10", "Organization" },
};
......@@ -38,7 +38,7 @@ namespace Coscine.Api.STS.Utils
user.EmailAddress = (string)value;
break;
case "urn:oid:1.3.6.1.4.1.5923.1.1.1.9":
if (user.Entitlement == null || !user.Entitlement.Contains("employee"))
if (user.Entitlement == null || !(user.Entitlement.Contains("employee") || user.Entitlement.Contains("staff")))
{
user.Entitlement = (string)value;
}
......