Mark "Talk" active on /call/token URLs

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-12-04 10:13:44 +01:00
parent f7732ace10
commit c17d86c081
No known key found for this signature in database
GPG key ID: 7076EA9751AACDDA

View file

@ -121,6 +121,8 @@ class SecurityMiddleware extends Middleware {
* @param Controller $controller the controller * @param Controller $controller the controller
* @param string $methodName the name of the method * @param string $methodName the name of the method
* @throws SecurityException when a security check fails * @throws SecurityException when a security check fails
*
* @suppress PhanUndeclaredClassConstant
*/ */
public function beforeController($controller, $methodName) { public function beforeController($controller, $methodName) {
@ -128,6 +130,10 @@ class SecurityMiddleware extends Middleware {
// for normal HTML requests and not for AJAX requests // for normal HTML requests and not for AJAX requests
$this->navigationManager->setActiveEntry($this->appName); $this->navigationManager->setActiveEntry($this->appName);
if ($controller === \OCA\Spreed\Controller\PageController::class && $methodName === 'showCall') {
$this->navigationManager->setActiveEntry('spreed');
}
// security checks // security checks
$isPublicPage = $this->reflector->hasAnnotation('PublicPage'); $isPublicPage = $this->reflector->hasAnnotation('PublicPage');
if(!$isPublicPage) { if(!$isPublicPage) {