-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add appconfig to disable fixed userfolder permissions optimization #51145
base: master
Are you sure you want to change the base?
Conversation
02aa7cf
to
0b62c0e
Compare
…imization Signed-off-by: Robin Appelman <[email protected]>
… at / exists Signed-off-by: Robin Appelman <[email protected]>
0b62c0e
to
1b40100
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like a hack, but I guess there is no better way to do it.
Is that optimization really worth it?
/** | ||
* Check if any mountpoint is configured that overwrite the home folder | ||
* | ||
* @return bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary?
@@ -86,6 +87,10 @@ abstract class StoragesServiceTest extends \Test\TestCase { | |||
* @var \PHPUnit\Framework\MockObject\MockObject|IEventDispatcher | |||
*/ | |||
protected IEventDispatcher $eventDispatcher; | |||
/** | |||
* @var \PHPUnit\Framework\MockObject\MockObject|IAppConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @var \PHPUnit\Framework\MockObject\MockObject|IAppConfig | |
* @var \PHPUnit\Framework\MockObject\MockObject&IAppConfig |
@@ -46,6 +47,8 @@ abstract class NodeTest extends \Test\TestCase { | |||
protected $eventDispatcher; | |||
/** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ | |||
protected $cacheFactory; | |||
/** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ | |
/** @var IAppConfig&\PHPUnit\Framework\MockObject\MockObject */ |
@@ -39,6 +40,8 @@ class RootTest extends \Test\TestCase { | |||
private $eventDispatcher; | |||
/** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ | |||
protected $cacheFactory; | |||
/** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** @var IAppConfig|\PHPUnit\Framework\MockObject\MockObject */ | |
/** @var IAppConfig&\PHPUnit\Framework\MockObject\MockObject */ |
Currently, to save having to fetch the metadata of the home folder in many cases, we always assume the same value for the permissions of the home folder.
This does however break if the admin has configured an external storage mounted at
/
with different permissions.To fix those cases without breaking the optimization for other instances, this adds a flag in the appconfig to disable the optimization and actually fetch the correct permissions.
This flag is automatically set by the files_external app when such an external storage is detected
To test:
/
and set as readonly