Open PVince81 opened 4 years ago
tagged as good first issue
to access config.php settings from inside ActionProviderStore, inject the IConfig
in the constructor and use getSystemValue()
Something like this inside ActionProviderStore.php
@PVince81?
private function getServerProviderClasses(): array {
$showProfile = $this->$config->$getSystemValueBool('contacts_menu_show_profile', true);
$showLocalTime = $this->$config->$getSystemValueBool('contacts_menu_show_local_time', true);
$showEMail = $this->$config->$getSystemValueBool('contacts_menu_show_email', false);
$providerClasses = array();
if($showProfile) {
array_push($providerClasses, ProfileProvider::class);
}
if($showLocalTime) {
array_push($providerClasses, LocalTimeProvider::class);
}
if($showEMail) {
array_push($providerClasses, EMailProvider::class);
}
return $providerClasses;
}
Steps
Expected result
In the case of external people, we should not see their email address.
Actual result
There's an option to see and click an email address
I suggest to add an option to remove the EmailProvider in config.php or other. A quick hack is to remove https://github.com/nextcloud/server/blob/stable20/lib/private/Contacts/ContactsMenu/ActionProviderStore.php#L88 in config.php
Version
Nextcloud 20
@rullzer @ChristophWurst FYI