Skip to content

Commit d41cdc8

Browse files
committed
feat: 1. update Dockerfile 2. fix single quote issue 3. currentUser add ip 4. use old refresh token
1 parent 4aaf36f commit d41cdc8

File tree

24 files changed

+122
-126
lines changed

24 files changed

+122
-126
lines changed

deploy/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ COPY --from=jre-build /build/jre /app
6565
ARG JAR_FILE=/openblocks-server/openblocks-server/target/openblocks-server-1.0-SNAPSHOT.jar
6666
ARG PLUGIN_JARS=/openblocks-server/openblocks-plugins/*/target/*.jar
6767

68-
RUN mkdir -p /openblocks /openblocks/plugins /var/www/openblocks
68+
RUN mkdir -p /openblocks /openblocks/plugins /var/www/openblocks /env2
6969

7070
COPY --from=build-server ${JAR_FILE} /openblocks/server.jar
7171
COPY --from=build-server ${PLUGIN_JARS} /openblocks/plugins/
@@ -87,7 +87,7 @@ COPY ./deploy/docker/templates/supervisord/* /etc/supervisor/conf.d/
8787

8888
# copy application.yml
8989
COPY ./server/openblocks-server/src/main/resources/selfhost/ce/application.yml /env/
90-
COPY ./server/openblocks-server/src/main/resources/selfhost/ce/application-selfhost.yml /env/
90+
COPY ./server/openblocks-server/src/main/resources/selfhost/ce/application-selfhost.yml /env2/
9191

9292
# Add bootstrapfile
9393
# COPY ./entrypoint.sh /

deploy/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ init_configuration() {
1515
if ! [ -e "$YML_PATH" ]; then
1616
echo "yml configuration not exist"
1717
mkdir -p "$CONFIG_PATH"
18-
cp /env/application-selfhost.yml $CONFIG_PATH/
18+
cp /env2/application-selfhost.yml $CONFIG_PATH/
1919
fi
2020
}
2121

deploy/docker/templates/supervisord/backend.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[program:backend]
22
directory=/openblocks
33
# Ref -Dlog4j2.formatMsgNoLookups=true https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
4-
command=/app/bin/java -Djava.security.egd="file:/dev/./urandom" -Dlog4j2.formatMsgNoLookups=true -Dspring.config.location="file:///openblocks-stacks/configuration/application-selfhost.yml,file:///env/application.yml" -jar /openblocks/server.jar
4+
command=/app/bin/java -Djava.security.egd="file:/dev/./urandom" -Dlog4j2.formatMsgNoLookups=true -Dspring.config.location="file:///env/application.yml,file:///openblocks-stacks/configuration/application-selfhost.yml" -jar /openblocks/server.jar
55

66
priority=15
77
autostart=true

server/openblocks-domain/src/main/java/com/openblocks/domain/user/model/Connection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.fasterxml.jackson.annotation.JsonCreator;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18+
import com.fasterxml.jackson.annotation.JsonProperty.Access;
1819

1920
import lombok.Builder;
2021
import lombok.Getter;
@@ -41,6 +42,7 @@ public class Connection {
4142
private Set<String> orgIds;
4243

4344
@Nullable
45+
@JsonProperty(access = Access.WRITE_ONLY)
4446
private ConnectionAuthToken authConnectionAuthToken;
4547

4648
private Map<String, Object> rawUserInfo;

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/Aggregate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public Aggregate(Map<String, Object> formData) {
6464
}
6565

6666
@Override
67-
public Boolean isValid() {
67+
public boolean isValid() {
6868
if (!super.isValid()) {
69-
return Boolean.FALSE;
69+
return false;
7070
}
7171

7272
if (StringUtils.isNullOrEmpty(pipeline)) {

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/Delete.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ public Delete(Map<String, Object> formData) {
5757
}
5858

5959
@Override
60-
public Boolean isValid() {
60+
public boolean isValid() {
6161
if (!super.isValid()) {
62-
return Boolean.FALSE;
62+
return false;
6363
}
6464

6565
if (StringUtils.isNotBlank(query)) {
66-
return Boolean.TRUE;
66+
return true;
6767
}
6868

6969
// Not adding smart defaults for query due to data impact
7070
fieldNamesWithNoConfiguration.add("Query");
71-
return Boolean.FALSE;
71+
return false;
7272
}
7373

7474
@Override

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/Distinct.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ public Distinct(Map<String, Object> formData) {
5050
}
5151

5252
@Override
53-
public Boolean isValid() {
53+
public boolean isValid() {
5454
if (!super.isValid()) {
55-
return Boolean.FALSE;
55+
return false;
5656
}
5757

5858
if (StringUtils.isNotBlank(key)) {
59-
return Boolean.TRUE;
59+
return true;
6060
}
6161

6262
fieldNamesWithNoConfiguration.add("Key/Field");
6363

64-
return Boolean.FALSE;
64+
return false;
6565
}
6666

6767
@Override

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/Insert.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ public Insert(Map<String, Object> formData) {
5151
}
5252

5353
@Override
54-
public Boolean isValid() {
54+
public boolean isValid() {
5555
if (!super.isValid()) {
56-
return Boolean.FALSE;
56+
return false;
5757
}
5858

5959
if (StringUtils.isNotBlank(documents)) {
60-
return Boolean.TRUE;
60+
return true;
6161
}
6262

6363
fieldNamesWithNoConfiguration.add("Documents");
64-
return Boolean.FALSE;
64+
return false;
6565
}
6666

6767
@Override

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/MongoCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ public MongoCommand(Map<String, Object> formData) {
6666
timeoutMs = MapUtils.getInteger(formData, "timeout", DEFAULT_VALUE);
6767
}
6868

69-
public Boolean isValid() {
69+
public boolean isValid() {
7070
if (StringUtils.isBlank(this.collection)) {
7171
fieldNamesWithNoConfiguration.add(COLLECTION);
72-
return Boolean.FALSE;
72+
return false;
7373
}
74-
return Boolean.TRUE;
74+
return true;
7575
}
7676

7777
public Document parseCommand() {

server/openblocks-plugins/mongoPlugin/src/main/java/com/openblocks/plugin/mongo/commands/UpdateMany.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ public UpdateMany(Map<String, Object> formData) {
6464
}
6565

6666
@Override
67-
public Boolean isValid() {
67+
public boolean isValid() {
6868
if (!super.isValid()) {
69-
return Boolean.FALSE;
69+
return false;
7070
}
7171

7272
if (StringUtils.isNotBlank(query) && StringUtils.isNotBlank(update)) {
73-
return Boolean.TRUE;
73+
return true;
7474
}
7575

7676
// Not adding smart defaults for query due to data impact
@@ -81,7 +81,7 @@ public Boolean isValid() {
8181
if (StringUtils.isBlank(update)) {
8282
fieldNamesWithNoConfiguration.add("Update");
8383
}
84-
return Boolean.FALSE;
84+
return false;
8585
}
8686

8787
@Override

0 commit comments

Comments
 (0)