aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Migration/DummyUserSession.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/Migration/DummyUserSession.php')
-rw-r--r--apps/files_external/lib/Migration/DummyUserSession.php54
1 files changed, 29 insertions, 25 deletions
diff --git a/apps/files_external/lib/Migration/DummyUserSession.php b/apps/files_external/lib/Migration/DummyUserSession.php
index 004ca019eb0..1ebf0e1ec4f 100644
--- a/apps/files_external/lib/Migration/DummyUserSession.php
+++ b/apps/files_external/lib/Migration/DummyUserSession.php
@@ -1,26 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Joas Schilling <coding@schilljs.com>
- * @author Robin Appelman <robin@icewind.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCA\Files_External\Migration;
use OCP\IUser;
@@ -28,12 +12,9 @@ use OCP\IUserSession;
class DummyUserSession implements IUserSession {
- /**
- * @var IUser
- */
- private $user;
+ private ?IUser $user = null;
- public function login($user, $password) {
+ public function login($uid, $password) {
}
public function logout() {
@@ -43,6 +24,10 @@ class DummyUserSession implements IUserSession {
$this->user = $user;
}
+ public function setVolatileActiveUser(?IUser $user): void {
+ $this->user = $user;
+ }
+
public function getUser() {
return $this->user;
}
@@ -50,4 +35,23 @@ class DummyUserSession implements IUserSession {
public function isLoggedIn() {
return !is_null($this->user);
}
+
+ /**
+ * get getImpersonatingUserID
+ *
+ * @return string|null
+ * @since 17.0.0
+ */
+ public function getImpersonatingUserID() : ?string {
+ return null;
+ }
+
+ /**
+ * set setImpersonatingUserID
+ *
+ * @since 17.0.0
+ */
+ public function setImpersonatingUserID(bool $useCurrentUser = true): void {
+ //no OP
+ }
}