aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/External
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-08-04 18:59:47 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2021-10-19 11:31:07 +0200
commitab275c5e38de80b6cbc1a60890d8076f5075cace (patch)
tree098244abbe6919fd5847f8390f19cb0b8dc1b39e /apps/files_sharing/lib/External
parent1b16a136ebd8f63e09df061d383f34170e2cef35 (diff)
downloadnextcloud-server-ab275c5e38de80b6cbc1a60890d8076f5075cace.tar.gz
nextcloud-server-ab275c5e38de80b6cbc1a60890d8076f5075cace.zip
move files_sharing to IBootStrap
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib/External')
-rw-r--r--apps/files_sharing/lib/External/Manager.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php
index d967f40cc32..a48e2a63ae4 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -31,6 +31,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+
namespace OCA\Files_Sharing\External;
use Doctrine\DBAL\Driver\Exception;
@@ -47,6 +48,7 @@ use OCP\Http\Client\IClientService;
use OCP\IDBConnection;
use OCP\IGroupManager;
use OCP\IUserManager;
+use OCP\IUserSession;
use OCP\Notification\IManager;
use OCP\OCS\IDiscoveryService;
use OCP\Share;
@@ -83,7 +85,7 @@ class Manager {
/** @var ICloudFederationFactory */
private $cloudFederationFactory;
- /** @var IGroupManager */
+ /** @var IGroupManager */
private $groupManager;
/** @var IUserManager */
@@ -96,25 +98,26 @@ class Manager {
private $logger;
public function __construct(
- IDBConnection $connection,
- \OC\Files\Mount\Manager $mountManager,
- IStorageFactory $storageLoader,
- IClientService $clientService,
- IManager $notificationManager,
- IDiscoveryService $discoveryService,
+ IDBConnection $connection,
+ \OC\Files\Mount\Manager $mountManager,
+ IStorageFactory $storageLoader,
+ IClientService $clientService,
+ IManager $notificationManager,
+ IDiscoveryService $discoveryService,
ICloudFederationProviderManager $cloudFederationProviderManager,
- ICloudFederationFactory $cloudFederationFactory,
- IGroupManager $groupManager,
- IUserManager $userManager,
- ?string $uid,
- IEventDispatcher $eventDispatcher,
- LoggerInterface $logger
+ ICloudFederationFactory $cloudFederationFactory,
+ IGroupManager $groupManager,
+ IUserManager $userManager,
+ IUserSession $userSession,
+ IEventDispatcher $eventDispatcher,
+ LoggerInterface $logger
) {
+ $user = $userSession->getUser();
$this->connection = $connection;
$this->mountManager = $mountManager;
$this->storageLoader = $storageLoader;
$this->clientService = $clientService;
- $this->uid = $uid;
+ $this->uid = $user ? $user->getUID() : null;
$this->notificationManager = $notificationManager;
$this->discoveryService = $discoveryService;
$this->cloudFederationProviderManager = $cloudFederationProviderManager;