瀏覽代碼

Do not list system users in contacts menu if sharing autocompletion is disabled

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v12.0.0beta2
Christoph Wurst 7 年之前
父節點
當前提交
56a9084dd2
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 8 行新增2 行删除
  1. 8
    2
      apps/dav/appinfo/app.php

+ 8
- 2
apps/dav/appinfo/app.php 查看文件

@@ -50,7 +50,13 @@ $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove',
$cm = \OC::$server->getContactsManager();
$cm->register(function() use ($cm, $app) {
$user = \OC::$server->getUserSession()->getUser();
if (!is_null($user)) {
$app->setupContactsProvider($cm, $user->getUID());
if (is_null($user)) {
return;
}
if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') !== 'yes') {
// Don't include system users
// This prevents user enumeration in the contacts menu and the mail app
return;
}
$app->setupContactsProvider($cm, $user->getUID());
});

Loading…
取消
儲存