Skip to content

Commit

Permalink
Back to SNAPSHOT dev cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 16, 2024
1 parent 45af05f commit f1e9da5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dashboard-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>dashboard</artifactId>
<version>12.3.13</version>
<version>12.3.14-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dashboard-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>dashboard</artifactId>
<version>12.3.13</version>
<version>12.3.14-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,15 @@ public class UrlResourceManage implements Manage {
private final RestTemplate restTemplate = new RestTemplate();
private final HttpHeaders httpHeaders;

private String requestedAttributes = "\"ALL_ATTRIBUTES\":true";
private String body = "{" + requestedAttributes + "}";
private String bodyForEntity = "{\"entityid\":\"@@entityid@@\", " + requestedAttributes + "}";
private String bodyForEid = "{\"eid\":@@eid@@, " + requestedAttributes + "}";
private String bodyForInstitutionId =
private final String requestedAttributes = "\"ALL_ATTRIBUTES\":true";
private final String body = "{" + requestedAttributes + "}";
private final String bodyForEntity = "{\"entityid\":\"@@entityid@@\", " + requestedAttributes + "}";
private final String bodyForInstitutionId =
"{\"metaDataFields.coin:institution_id\":\"@@institution_id@@\", \"ALL_ATTRIBUTES\":true}";

private String linkedQuery = "{$and: [{$or:[{\"data.allowedEntities.name\": {$in: [\"@@entityid@@\"]}}, {\"data" +
private final String linkedQuery = "{$and: [{$or:[{\"data.allowedEntities.name\": {$in: [\"@@entityid@@\"]}}, {\"data" +
".allowedall\": true}]}]}";

private String findByEntityIdIn = "{\"data.entityid\":{\"$in\":[@@entityids@@]}}";

public UrlResourceManage(
String username,
String password,
Expand Down Expand Up @@ -109,6 +106,7 @@ public Optional<ServiceProvider> getServiceProviderById(Long spId, EntityType en
if (spId == null) {
return Optional.empty();
}
String bodyForEid = "{\"eid\":@@eid@@, " + requestedAttributes + "}";
String body = bodyForEid.replace("@@eid@@", spId.toString());
List<Map<String, Object>> providers = getMaps(providerInputStream(entityType, body));
return providers.stream().map(this::transformManageMetadata).map(sp -> this.serviceProvider(sp, entityType)).findFirst();
Expand Down Expand Up @@ -163,6 +161,7 @@ public List<ServiceProvider> getLinkedServiceProviders(String idpId) {
@Override
public List<ServiceProvider> getByEntityIdin(List<String> entityIds) {
String split = entityIds.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(","));
String findByEntityIdIn = "{\"data.entityid\":{\"$in\":[@@entityids@@]}}";
String query = findByEntityIdIn.replace("@@entityids@@", split);
return rawSearchProviders(query, EntityType.saml20_sp, EntityType.oidc10_rp, EntityType.oauth20_rs);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>org.openconext</groupId>
<artifactId>dashboard</artifactId>
<version>12.3.13</version>
<version>12.3.14-SNAPSHOT</version>
<name>dashboard</name>
<description>OpenConext-Dashboard</description>
<inceptionYear>2012</inceptionYear>
Expand Down

0 comments on commit f1e9da5

Please sign in to comment.