]> source.dussan.org Git - nextcloud-server.git/commitdiff
Allow userId to be null 11939/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 4 Oct 2018 11:04:58 +0000 (13:04 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 19 Oct 2018 14:25:14 +0000 (16:25 +0200)
Fixes #10852

A quick hack. Still ensures some type safety however now also accepts
null. Else we'd need to add a whole new layer of middlewares.

This can only happen when a guest user wants to access a controller that
requries the user_id.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/files_sharing/lib/Controller/ShareAPIController.php

index 461c0e47320b30d6cc9f3ae4f1eedc162fad436c..308e7bbb7429a4d4d24160745c07130aee791ea2 100644 (file)
@@ -113,7 +113,7 @@ class ShareAPIController extends OCSController {
                IUserManager $userManager,
                IRootFolder $rootFolder,
                IURLGenerator $urlGenerator,
-               string $userId,
+               string $userId = null,
                IL10N $l10n,
                IConfig $config,
                IAppManager $appManager,