[Pkg-owncloud-commits] [owncloud] 82/129: Make `getCurrentUser` behaviour similar to `auth`

David Prévot taffit at moszumanska.debian.org
Thu Nov 5 01:04:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit e1642400f54143ed8827514f77c6a95e2e97e28f
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Fri Oct 23 13:39:12 2015 +0200

    Make `getCurrentUser` behaviour similar to `auth`
    
    If DAV_AUTHENTICATED is a null value this is a valid web session and we should return the user name as we also do in `auth`.
---
 lib/private/connector/sabre/auth.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php
index d33ffad..1e80e1d 100644
--- a/lib/private/connector/sabre/auth.php
+++ b/lib/private/connector/sabre/auth.php
@@ -99,6 +99,11 @@ class Auth extends AbstractBasic {
 		if($user && $this->isDavAuthenticated($user)) {
 			return $user;
 		}
+
+		if($user && is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED))) {
+			return $user;
+		}
+
 		return null;
 	}
 
@@ -114,6 +119,7 @@ class Auth extends AbstractBasic {
 	 * @param string $realm
 	 * @return bool
 	 * @throws ServiceUnavailable
+	 * @throws NotAuthenticated
 	 */
 	public function authenticate(\Sabre\DAV\Server $server, $realm) {
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list