Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
b069f33a
Commit
b069f33a
authored
10 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
throw exception when backends don't provide a user instead of creating legacy local storages
parent
5626a02d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/files/filesystem.php
+31
-31
31 additions, 31 deletions
lib/private/files/filesystem.php
lib/private/user/nouserexception.php
+14
-0
14 additions, 0 deletions
lib/private/user/nouserexception.php
with
45 additions
and
31 deletions
lib/private/files/filesystem.php
+
31
−
31
View file @
b069f33a
...
@@ -373,7 +373,11 @@ class Filesystem {
...
@@ -373,7 +373,11 @@ class Filesystem {
$userObject
=
\OC_User
::
getManager
()
->
get
(
$user
);
$userObject
=
\OC_User
::
getManager
()
->
get
(
$user
);
if
(
!
is_null
(
$userObject
))
{
if
(
is_null
(
$userObject
))
{
\OCP\Util
::
writeLog
(
'files'
,
' Backends provided no user object for '
.
$user
,
\OCP\Util
::
ERROR
);
throw
new
\OC\User\NoUserException
();
}
$homeStorage
=
\OC_Config
::
getValue
(
'objectstore'
);
$homeStorage
=
\OC_Config
::
getValue
(
'objectstore'
);
if
(
!
empty
(
$homeStorage
))
{
if
(
!
empty
(
$homeStorage
))
{
// sanity checks
// sanity checks
...
@@ -404,10 +408,6 @@ class Filesystem {
...
@@ -404,10 +408,6 @@ class Filesystem {
self
::
mount
(
$homeStorage
[
'class'
],
$homeStorage
[
'arguments'
],
$user
);
self
::
mount
(
$homeStorage
[
'class'
],
$homeStorage
[
'arguments'
],
$user
);
$home
=
\OC\Files\Filesystem
::
getStorage
(
$user
);
$home
=
\OC\Files\Filesystem
::
getStorage
(
$user
);
}
else
{
self
::
mount
(
'\OC\Files\Storage\Local'
,
array
(
'datadir'
=>
$root
),
$user
);
}
self
::
mountCacheDir
(
$user
);
self
::
mountCacheDir
(
$user
);
...
...
This diff is collapsed.
Click to expand it.
lib/private/user/nouserexception.php
0 → 100644
+
14
−
0
View file @
b069f33a
<?php
/**
* ownCloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING-AGPL file.
*
* @author Jörn Friedrich Dreyer <jfd@owncloud.com>
* @copyright Jörn Friedrich Dreyer 2015
*/
namespace
OC\User
;
class
NoUserException
extends
\Exception
{}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment