Skip to content
Snippets Groups Projects
Commit 3e6c04eb authored by CoscineBot's avatar CoscineBot :gear:
Browse files

Fix: Organization and Institutes

parent aeb96fe0
No related branches found
No related tags found
1 merge request!22Fix: Organizations could contain the information of Institutes
Pipeline #870189 passed
......@@ -19,7 +19,6 @@ public abstract class Reporting<O> where O : class
public GitLabClient GitLabClient { get; set; }
public List<Organization> Organizations { get; set; }
public RdfStoreConnector RdfStoreConnector { get; init; }
public SparqlRemoteEndpoint QueryEndpoint { get; init; }
public ConsulConfiguration Configuration { get; }
private static string HostUrl { get; } = "https://git.rwth-aachen.de/";
private static string InstanceName { get; set; } = null!;
......@@ -45,7 +44,6 @@ public abstract class Reporting<O> where O : class
Options = options;
Configuration = new ConsulConfiguration();
RdfStoreConnector = new RdfStoreConnector(Configuration.GetStringAndWait("coscine/local/virtuoso/additional/url"));
QueryEndpoint = new SparqlRemoteEndpoint(new Uri(Configuration.GetStringAndWait("coscine/local/virtuoso/additional/url")));
GitLabClient = new GitLabClient(HostUrl, Configuration.GetStringAndWait("coscine/global/gitlabtoken"));
Organizations = new List<Organization>() { _otherOrganization };
......
......@@ -171,6 +171,16 @@ public class UserReporting : Reporting<UserReportingOptions>
Console.WriteLine($" No {searchedEntityType} found for user with ID \"{id}\" and login provider {loginProvider.DisplayName}");
continue;
}
if (orgShibboleth.RorUrl.Contains('#'))
{
var orgTopLevelRor = orgShibboleth.RorUrl[..orgShibboleth.RorUrl.IndexOf('#')];
var orgTopLevel = FetchOrganizationByRor(orgTopLevelRor);
if (!orgTopLevel.RorUrl.Equals(_otherOrganization.RorUrl))
{
result.Add(orgTopLevel);
break;
}
}
result.Add(orgShibboleth);
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment