Skip to content

Commit 55533cf

Browse files
authoredMar 7, 2024
Merge pull request ONLYOFFICE#22 from ONLYOFFICE/develop
Release/v1.1.2
2 parents 3a650de + 0604365 commit 55533cf

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed
 

‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 1.1.2
4+
## Changed
5+
- fixed load properties in ConfigurationUtils
6+
- improving DefaultConfigService
7+
38
## 1.1.1
49
## Changed
510
- default conversion format (from docxf to pdf instead oform)

‎pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.onlyoffice</groupId>
88
<artifactId>docs-integration-sdk</artifactId>
9-
<version>1.1.1</version>
9+
<version>1.1.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>${project.groupId}:${project.artifactId}</name>

‎src/main/java/com/onlyoffice/service/documenteditor/config/DefaultConfigService.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ public EditorConfig getEditorConfig(final String fileId, final Mode mode, final
133133
.plugins(getPlugins(null))
134134
.build();
135135

136-
if (permissions != null && permissions.getEdit() && mode.equals(Mode.EDIT)) {
136+
if (permissions != null
137+
&& (
138+
Boolean.TRUE.equals(permissions.getEdit())
139+
|| Boolean.TRUE.equals(permissions.getFillForms())
140+
|| Boolean.TRUE.equals(permissions.getComment())
141+
|| Boolean.TRUE.equals(permissions.getReview())
142+
)
143+
&& mode.equals(Mode.EDIT)) {
137144
editorConfig.setCallbackUrl(urlManager.getCallbackUrl(fileId));
138145
}
139146

‎src/main/java/com/onlyoffice/utils/ConfigurationUtils.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ public static Integer getDemoTrialPeriod() {
9595
private static void init() {
9696
Properties properties = new Properties();
9797
try {
98-
InputStream stream = Thread.currentThread().getContextClassLoader()
98+
InputStream stream = ConfigurationUtils.class
99+
.getClassLoader()
99100
.getResourceAsStream(PROPERTIES_PREFIX + ".properties");
100101
properties.load(stream);
101102
} catch (Exception e) {

0 commit comments

Comments
 (0)
Please sign in to comment.