Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcaunt committed Nov 27, 2024
2 parents 5058a8a + 97ecfa6 commit e8f70b4
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 34 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.0.3 27/11/2024
================
* FIX #6: Add responses for POST Requests in JupyterController
* FIX #5: Avoid json serialization of instrument scientists

3.0.2 25/11/2024
================
* Fix bug of synchronising all activity updates on user interaction with remote desktop.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>eu.ill.visa</groupId>
<artifactId>api</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>

<modules>
<module>visa-core</module>
Expand Down
12 changes: 6 additions & 6 deletions visa-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -32,27 +32,27 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-web-rest</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-web-graphql</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-web-gateway</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-remote-desktop</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-scheduler</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions visa-business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -22,17 +22,17 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-persistence</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-cloud</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-message-broker</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion visa-cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion visa-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package eu.ill.visa.core.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
Expand Down Expand Up @@ -64,6 +65,7 @@ public class Instrument {
@Column(name = "name", length = 250, nullable = false)
private String name;

@JsonIgnore
@ManyToMany()
@JoinTable(
name = "instrument_scientist",
Expand Down
4 changes: 2 additions & 2 deletions visa-message-broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-core</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions visa-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-core</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill</groupId>
Expand Down
4 changes: 2 additions & 2 deletions visa-remote-desktop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions visa-scheduler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
4 changes: 2 additions & 2 deletions visa-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>visa-security</artifactId>
Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions visa-web-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,12 +18,12 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-message-broker</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions visa-web-graphql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,12 +18,12 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-security</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions visa-web-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>api</artifactId>
<groupId>eu.ill.visa</groupId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -18,12 +18,12 @@
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-business</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>eu.ill.visa</groupId>
<artifactId>visa-security</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,23 @@ public MetaResponse<InstanceDto> get(@Context final SecurityContext securityCont
@POST
@Path("/{instance}/notebook/open")
@Authenticated
public void jupyterSessionOpen(@Context final SecurityContext securityContext, @PathParam("instance") Instance instance, @NotNull @Valid final JupyterNotebookSessionInput input) {
public MetaResponse<String> jupyterSessionOpen(@Context final SecurityContext securityContext, @PathParam("instance") Instance instance, @NotNull @Valid final JupyterNotebookSessionInput input) {
final User user = this.getUserPrincipal(securityContext);

if (this.instanceService.isAuthorisedForInstance(user, instance)) {
this.instanceJupyterSessionService.create(instance, user, input.getKernelId(), input.getSessionId());
return createResponse();
}

throw new NotFoundException();
}

@POST
@Path("/{instance}/notebook/close")
public void jupyterSessionClose(@PathParam("instance") Instance instance, @NotNull @Valid final JupyterNotebookSessionInput input) {
public MetaResponse<String> jupyterSessionClose(@PathParam("instance") Instance instance, @NotNull @Valid final JupyterNotebookSessionInput input) {
// Allow any access this endpoint: allows the visa-jupyter-proxy to remove zombie sessions without authentication (needs to know both kernelId and sessionId so security risk is low)
this.instanceJupyterSessionService.destroy(instance, input.getKernelId(), input.getSessionId());
return createResponse();
}

private boolean isAuthorisedForJupyter(User user, Instance instance) {
Expand Down

0 comments on commit e8f70b4

Please sign in to comment.