The MailPlugin collaborator returned results for both user and mail
collaborators, but it was registered only for mail collaborators. While
it might make sense to move the user results to the UserPlugin instead
that change would be more complex and riskier, so for now the MailPlugin
is now registered for both user and mail collaborators and the results
are limited only to the registered type.
As the plugins are registered only with their class and then resolved
when needed using dependency injection it is not possible (as far as I
know) to provide an explicit parameter in the constructor to
differentiate whether the MailPlugin should return user or mail
collaborators. To overcome this two subclasses are introduced,
MailByMailPlugin and UserByMailPlugin, which just hardcode in their
constructor the collaborator type that their parent MailPlugin must use,
and those subclasses are the ones registered instead of the MailPlugin
(which still contains all the logic).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The federation app is not always installed, causing errors when
TrustedServers is injected as a hard dependency. This change makes
the dependency optional by using nullable types and null-safe
operators, defaulting to false when unavailable.
Modified backport of #55893 which are required for
the stable31 backport to function correctly.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
When `show_federated_shares_to_trusted_servers_as_internal` is enabled
but `show_federated_shares_as_internal` is not, filter federated share
suggestions to only include trusted servers. Previously, searching for
an email address would suggest non-trusted federated servers.
Resolved: #54511
Signed-off-by: nfebe <fenn25.fn@gmail.com>
ZIP does not use a proper timestamp but uses something called "DOS time".
This is a weird old format with some limitations like accuracy of only
2 seconds, but also no timezone information.
Also unline UNIX time it is not relative to some specific point in time
with timezone information, but is always considered to be the local
time. Meaning we need to convert it first to the users local time.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
When searching we need to:
1. check if sharing is limited to groups
- if yes only include those
- otherwise continue
2. check if there are restrictions to groups or phonebook
3. check if full match is included
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Add missing `matchUserId` method for full-match-autocomplete options
and update docs to make it clearer what each options exactly means.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>