Merge pull request #2726 from eszkadev/private-zotero-key

Use private field for sharing Zotero key
This commit is contained in:
Julius Härtl 2023-01-09 19:00:57 +01:00 коммит произвёл GitHub
Родитель a857c8493b 19972586bf
Коммит 39747d6cb6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -205,6 +205,7 @@ class WopiController extends Controller {
'OwnerId' => $wopi->getOwnerUid(),
'UserFriendlyName' => $userDisplayName,
'UserExtraInfo' => [],
'UserPrivateInfo' => [],
'UserCanWrite' => (bool)$wopi->getCanwrite(),
'UserCanNotWriteRelative' => $isPublic || $this->encryptionManager->isEnabled() || $wopi->getHideDownload(),
'PostMessageOrigin' => $wopi->getServerHost(),
@ -226,7 +227,7 @@ class WopiController extends Controller {
$zoteroAPIKey = $this->config->getUserValue($wopi->getEditorUid(), 'richdocuments', 'zoteroAPIKey', '');
if (!empty($zoteroAPIKey)) {
$response['UserExtraInfo']['ZoteroAPIKey'] = $zoteroAPIKey;
$response['UserPrivateInfo']['ZoteroAPIKey'] = $zoteroAPIKey;
}
if ($wopi->hasTemplateId()) {
$templateUrl = 'index.php/apps/richdocuments/wopi/template/' . $wopi->getTemplateId() . '?access_token=' . $wopi->getToken();