mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Merge c2832f9b12 into d09b8c99de
This commit is contained in:
commit
baf843f9d1
1 changed files with 16 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ namespace OCA\Files_Sharing\Controller;
|
|||
use Generator;
|
||||
use OC\Collaboration\Collaborators\SearchResult;
|
||||
use OC\Share\Share;
|
||||
use OCA\FederatedFileSharing\FederatedShareProvider;
|
||||
use OCA\Files_Sharing\ResponseDefinitions;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Http;
|
||||
|
|
@ -72,6 +73,7 @@ class ShareesAPIController extends OCSController {
|
|||
protected IURLGenerator $urlGenerator,
|
||||
protected IManager $shareManager,
|
||||
protected ISearch $collaboratorSearch,
|
||||
protected FederatedShareProvider $federatedShareProvider,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
@ -141,6 +143,20 @@ class ShareesAPIController extends OCSController {
|
|||
if ($this->shareManager->shareProviderExists(IShare::TYPE_ROOM)) {
|
||||
$shareTypes[] = IShare::TYPE_ROOM;
|
||||
}
|
||||
} elseif ($itemType === 'contacts') {
|
||||
if ($this->shareManager->allowGroupSharing()) {
|
||||
$shareTypes[] = IShare::TYPE_GROUP;
|
||||
}
|
||||
|
||||
if ($this->federatedShareProvider->isOutgoingServer2serverShareEnabled()) {
|
||||
$shareTypes[] = IShare::TYPE_REMOTE;
|
||||
}
|
||||
|
||||
if ($this->federatedShareProvider->isOutgoingServer2serverGroupShareEnabled()) {
|
||||
$shareTypes[] = IShare::TYPE_REMOTE_GROUP;
|
||||
}
|
||||
|
||||
$shareTypes[] = IShare::TYPE_EMAIL;
|
||||
} else {
|
||||
if ($this->shareManager->allowGroupSharing()) {
|
||||
$shareTypes[] = IShare::TYPE_GROUP;
|
||||
|
|
|
|||
Loading…
Reference in a new issue