mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
adjust PrincipilUri as returned from Sabre to effective username
This commit is contained in:
parent
a6c921267e
commit
117c1bffa7
1 changed files with 7 additions and 1 deletions
|
|
@ -169,6 +169,12 @@ class Auth extends AbstractBasic {
|
|||
throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls');
|
||||
}
|
||||
|
||||
return parent::check($request, $response);
|
||||
$data = parent::check($request, $response);
|
||||
if($data[0] === true) {
|
||||
$startPos = strrpos($data[1], '/') + 1;
|
||||
$user = $this->userSession->getUser()->getUID();
|
||||
$data[1] = substr_replace($data[1], $user, $startPos);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue