Merge pull request #29072 from nextcloud/backport/29056/stable20

pull/29548/head
John Molakvoæ 3 years ago committed by GitHub
commit 31f30d54c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,6 +32,7 @@ use OC\Authentication\TwoFactorAuth\Manager;
use OC\Core\Controller\LoginController;
use OC\Core\Controller\TwoFactorChallengeController;
use OC\User\Session;
use OCA\TwoFactorNextcloudNotification\Controller\APIController;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Middleware;
@ -83,6 +84,11 @@ class TwoFactorMiddleware extends Middleware {
* @param string $methodName
*/
public function beforeController($controller, $methodName) {
if ($controller instanceof APIController && $methodName === 'poll') {
// Allow polling the twofactor nextcloud notifications state
return;
}
if ($controller instanceof TwoFactorChallengeController
&& $this->userSession->getUser() !== null
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {

@ -77,6 +77,7 @@
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="OCA\GroupFolders\Mount\GroupFolderStorage"/>
<referencedClass name="OCA\TwoFactorNextcloudNotification\Controller\APIController"/>
</errorLevel>
</UndefinedClass>
<UndefinedFunction>

Loading…
Cancel
Save