summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-12-02 22:29:12 +0100
committerGitHub <noreply@github.com>2021-12-02 22:29:12 +0100
commite139ccc66c10fba9b39e30d813e14c47b48b0baa (patch)
treee63ea8bf973636d01bc9ccc3bb023195fa602e8a
parent41b6052cb747a5c6354687d0dcf718582e490d27 (diff)
parentbf7c9aa58cec0f6d67f64394d37f2f71e4c1e44c (diff)
downloadnextcloud-server-e139ccc66c10fba9b39e30d813e14c47b48b0baa.tar.gz
nextcloud-server-e139ccc66c10fba9b39e30d813e14c47b48b0baa.zip
Merge pull request #30024 from nextcloud/techdebt/noid/list-php-are-only-invokable-via-controllers
list.php files are only invoked via ViewController and APIController
-rw-r--r--apps/files/list.php2
-rw-r--r--apps/files/recentlist.php3
-rw-r--r--apps/files_external/list.php3
-rw-r--r--apps/files_sharing/list.php2
-rw-r--r--apps/files_trashbin/list.php2
-rw-r--r--apps/systemtags/list.php17
6 files changed, 3 insertions, 26 deletions
diff --git a/apps/files/list.php b/apps/files/list.php
index 9d3e1a33b0f..09dc217139c 100644
--- a/apps/files/list.php
+++ b/apps/files/list.php
@@ -29,7 +29,7 @@ $userSession = \OC::$server->getUserSession();
// TODO: move this to the generated config.js
/** @var IManager $shareManager */
$shareManager = \OC::$server->get(IManager::class);
-$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';;
+$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';
$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false);
diff --git a/apps/files/recentlist.php b/apps/files/recentlist.php
index 2d250e1fc37..874ecca957c 100644
--- a/apps/files/recentlist.php
+++ b/apps/files/recentlist.php
@@ -23,8 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-// Check if we are a user
-OC_Util::checkLoggedIn();
+
$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
diff --git a/apps/files_external/list.php b/apps/files_external/list.php
index f230057f3d2..f38e9da1bc3 100644
--- a/apps/files_external/list.php
+++ b/apps/files_external/list.php
@@ -23,8 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-// Check if we are a user
-OC_Util::checkLoggedIn();
+
$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php
index f9f6ddd3bc5..edcfdc180a6 100644
--- a/apps/files_sharing/list.php
+++ b/apps/files_sharing/list.php
@@ -28,8 +28,6 @@ use OCA\Files\Event\LoadSidebar;
use OCA\Viewer\Event\LoadViewer;
use OCP\EventDispatcher\GenericEvent;
-// Check if we are a user
-OC_Util::checkLoggedIn();
$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
$legacyEventDispatcher = \OC::$server->getEventDispatcher();
diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php
index 3a4e6d7d1e2..117d3b4ddfe 100644
--- a/apps/files_trashbin/list.php
+++ b/apps/files_trashbin/list.php
@@ -24,8 +24,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-// Check if we are a user
-OC_Util::checkLoggedIn();
$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
diff --git a/apps/systemtags/list.php b/apps/systemtags/list.php
index d7ba2c9eed9..b5bbf223f29 100644
--- a/apps/systemtags/list.php
+++ b/apps/systemtags/list.php
@@ -20,23 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-// WARNING: this should be moved to proper AppFramework handling
-// Check if we are a user
-if (!\OC::$server->getUserSession()->isLoggedIn()) {
- header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
- 'core.login.showLoginForm',
- [
- 'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
- ]
- )
- );
- exit();
-}
-// Redirect to 2FA challenge selection if 2FA challenge was not solved yet
-if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
- header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
- exit();
-}
$tmpl = new OCP\Template('systemtags', 'list', '');
$tmpl->printPage();