From 15f00f01263aa00d7722bf5618cb062170d5830e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Nov 2019 23:40:02 +0100 Subject: [PATCH 1/2] Mark "Talk" active on /call/token URLs Signed-off-by: Joas Schilling --- .../AppFramework/Middleware/Security/SecurityMiddleware.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 4f380f07d9170..52d1823f219c3 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -128,6 +128,11 @@ public function beforeController($controller, $methodName) { // for normal HTML requests and not for AJAX requests $this->navigationManager->setActiveEntry($this->appName); + /** @suppress PhanUndeclaredClassConstant */ + if ($controller === \OCA\Talk\Controller\PageController::class && $methodName === 'showCall') { + $this->navigationManager->setActiveEntry('spreed'); + } + // security checks $isPublicPage = $this->reflector->hasAnnotation('PublicPage'); if(!$isPublicPage) { From 9055f46351bba23b31d966251486a2b2d47bbdd0 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 19 Nov 2019 16:16:26 +0100 Subject: [PATCH 2/2] Make phan happy ;) Signed-off-by: Daniel Kesselberg --- .../AppFramework/Middleware/Security/SecurityMiddleware.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index 52d1823f219c3..586d405764179 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -121,6 +121,8 @@ public function __construct(IRequest $request, * @param Controller $controller the controller * @param string $methodName the name of the method * @throws SecurityException when a security check fails + * + * @suppress PhanUndeclaredClassConstant */ public function beforeController($controller, $methodName) { @@ -128,7 +130,6 @@ public function beforeController($controller, $methodName) { // for normal HTML requests and not for AJAX requests $this->navigationManager->setActiveEntry($this->appName); - /** @suppress PhanUndeclaredClassConstant */ if ($controller === \OCA\Talk\Controller\PageController::class && $methodName === 'showCall') { $this->navigationManager->setActiveEntry('spreed'); }