Skip to content

Commit

Permalink
Do not list system users in contacts menu if sharing autocompletion i…
Browse files Browse the repository at this point in the history
…s disabled

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed May 9, 2017
1 parent 684997f commit 56a9084
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/dav/appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ function(GenericEvent $event) use ($app) {
$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());
});

0 comments on commit 56a9084

Please sign in to comment.