Skip to content

Commit

Permalink
Merge branch 'develop' into feature/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandrfedorov97 committed Apr 17, 2024
2 parents 8dc73fc + b60c0f1 commit b81a527
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Module configuration can be found inside `Alfresco Administration Console` or by
> You can also add `onlyoffice.url` in `alfresco-global.properties`. Configuration made via settings page will override `alfresco-global.properties`.
Starting from version 7.2, JWT is enabled by default and the secret key is generated automatically to restrict the access to ONLYOFFICE Docs and for security reasons and data integrity.
Specify your own **Secret key** on the Alfresco configuration page or by adding *onlyoffice.jwtsecret* to `alfresco-global.properties`. In the ONLYOFFICE Docs [config file](https://api.onlyoffice.com/editors/signature/), specify the same secret key and enable the validation.
Specify your own **Secret key** on the Alfresco configuration page or by adding *onlyoffice.security.key* to `alfresco-global.properties`. In the ONLYOFFICE Docs [config file](https://api.onlyoffice.com/editors/signature/), specify the same secret key and enable the validation.
## Compiling ONLYOFFICE Alfresco module package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import com.onlyoffice.manager.settings.DefaultSettingsManager;
import org.alfresco.service.cmr.attributes.AttributeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import java.util.Properties;

/*
Copyright (c) Ascensio System SIA 2024. All rights reserved.
Expand All @@ -11,13 +14,22 @@

public class SettingsManagerImpl extends DefaultSettingsManager {
private static final String SETTINGS_PREFIX = "onlyoffice.";
@Autowired
private AttributeService attributeService;

@Autowired
AttributeService attributeService;
@Qualifier("global-properties")
private Properties globalProp;

@Override
public String getSetting(String name) {
return (String) attributeService.getAttribute(SETTINGS_PREFIX + name);
Object value = attributeService.getAttribute(SETTINGS_PREFIX + name);

if (value == null) {
value = globalProp.get(SETTINGS_PREFIX + name);
}

return (String) value;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{
"docurl":"${(docurl!"")?json_string}",
"jwtsecret":"${(jwtsecret!"")?json_string}",
"docinnerurl":"${(docinnerurl!"")?json_string}",
"alfurl":"${(alfurl!"")?json_string}",
"cert":"${(cert?length > 0)?c}",
"forcesave":"${(forcesave?length > 0)?c}",
"webpreview":"${(webpreview?length > 0)?c}",
"chat":"${(chat?length > 0)?c}",
"help":"${(help?length > 0)?c}",
"compactHeader":"${(compactHeader?length > 0)?c}",
"toolbarNoTabs":"${(toolbarNoTabs?length > 0)?c}",
"feedback":"${(feedback?length > 0)?c}",
"reviewDisplay":"${(reviewDisplay!"")?json_string}"
"url":"${(settings['url']!"")?json_string}",
"security": {
"key": ${(settings['security.key']!"")?json_string}"
},
"innerUrl":"${(settings['innerUrl']!"")?json_string}",
"productInnerUrl":"${(settings['productInnerUrl']!"")?json_string}",
"ignoreSSLCertificate":${(settings['ignoreSSLCertificate']!false)?json_string},
"webpreview": ${webpreview?c},
"customization": {
"forcesave": ${(settings['customization.forcesave']!false)?json_string},
"chat": ${settings['customization.chat']},
"help": ${settings['customization.help']},
"compactHeader": ${(settings['customization.compactHeader']!false)?json_string},
"toolbarNoTabs": ${(settings['customization.toolbarNoTabs']!false)?json_string},
"feedback": ${(settings['customization.feedback']!false)?json_string},
"reviewDisplay": ${settings['customization.review.reviewDisplay']}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

var multipleDownloadPost = function (requestData) {
var waitDialog = Alfresco.util.PopupManager.displayMessage({
text : "",
text : Alfresco.util.message("label.loading"),
spanClass : "wait",
displayTime : 0
});
Expand Down

0 comments on commit b81a527

Please sign in to comment.