Skip to content

Commit

Permalink
Exclude login and registration
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Mar 18, 2021
1 parent 2da2ca8 commit 36f2a48
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lib/Filesystem/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
namespace OCA\TermsOfService\Filesystem;

use OC;
use OC\Core\Controller\ClientFlowLoginController;
use OC\Core\Controller\ClientFlowLoginV2Controller;
use OC\Core\Controller\LoginController;
use OCA\Files_Sharing\Controller\ShareController;
use OCA\Registration\Controller\RegisterController;
use OCA\TermsOfService\AppInfo\Application;
use OCA\TermsOfService\Checker;

Expand Down Expand Up @@ -62,9 +65,19 @@ protected function isCreatingSkeletonFiles(): bool {
$exception = new \Exception();
$trace = $exception->getTrace();
foreach ($trace as $step) {
if (isset($step['class'], $step['function']) &&
(($step['class'] === LoginController::class && $step['function'] === 'tryLogin')
|| ($step['class'] === 'OC_Util' && $step['function'] === 'copySkeleton'))) {
if (isset($step['class'], $step['function'])
&& $step['class'] === 'OC_Util'
&& $step['function'] === 'copySkeleton') {
return true;
}

if (isset($step['class'])
&& (
$step['class'] === LoginController::class
|| $step['class'] === ClientFlowLoginController::class
|| $step['class'] === ClientFlowLoginV2Controller::class
|| $step['class'] === RegisterController::class
)) {
return true;
}
}
Expand Down

0 comments on commit 36f2a48

Please sign in to comment.