aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/AppInfo
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-07-17 16:48:47 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-07-18 20:15:39 +0200
commitf28d933acc2d97021c69be79c7f2238cbaac419f (patch)
treed5fe8eceb005d3d72d236abb4bc1c29be4273d25 /apps/files_sharing/lib/AppInfo
parentf45d6135d7f707d34017312e975137c645d202c7 (diff)
downloadnextcloud-server-f28d933acc2d97021c69be79c7f2238cbaac419f.tar.gz
nextcloud-server-f28d933acc2d97021c69be79c7f2238cbaac419f.zip
feat(files_sharing): add public name prompt for files requests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/lib/AppInfo')
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 82a5981febf..98c2d280856 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -18,6 +18,7 @@ use OCA\Files_Sharing\Helper;
use OCA\Files_Sharing\Listener\BeforeDirectFileDownloadListener;
use OCA\Files_Sharing\Listener\BeforeZipCreatedListener;
use OCA\Files_Sharing\Listener\LoadAdditionalListener;
+use OCA\Files_Sharing\Listener\LoadPublicFileRequestAuthListener;
use OCA\Files_Sharing\Listener\LoadSidebarListener;
use OCA\Files_Sharing\Listener\ShareInteractionListener;
use OCA\Files_Sharing\Listener\UserAddedToGroupListener;
@@ -34,6 +35,7 @@ use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
+use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudIdManager;
@@ -85,7 +87,7 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(GroupChangedEvent::class, GroupDisplayNameCache::class);
$context->registerEventListener(GroupDeletedEvent::class, GroupDisplayNameCache::class);
- // sidebar and files scripts
+ // Sidebar and files scripts
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class);
$context->registerEventListener(LoadSidebar::class, LoadSidebarListener::class);
$context->registerEventListener(ShareCreatedEvent::class, ShareInteractionListener::class);
@@ -95,6 +97,9 @@ class Application extends App implements IBootstrap {
// Handle download events for view only checks
$context->registerEventListener(BeforeZipCreatedEvent::class, BeforeZipCreatedListener::class);
$context->registerEventListener(BeforeDirectFileDownloadEvent::class, BeforeDirectFileDownloadListener::class);
+
+ // File request auth
+ $context->registerEventListener(BeforeTemplateRenderedEvent::class, LoadPublicFileRequestAuthListener::class);
}
public function boot(IBootContext $context): void {