Skip to content
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

[24] make groupfolders use system wide encryption keys #33700

Merged
merged 1 commit into from Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/private/Encryption/Util.php
Expand Up @@ -34,6 +34,7 @@
use OC\Files\View;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\GroupFolders\Mount\GroupMountPoint;
PVince81 marked this conversation as resolved.
Show resolved Hide resolved
use OCP\Encryption\IEncryptionModule;
use OCP\IConfig;
use OCP\IUser;
Expand Down Expand Up @@ -299,6 +300,15 @@ public function getUserWithAccessToMountPoint($users, $groups) {
* @return boolean
*/
public function isSystemWideMountPoint($path, $uid) {
$mount = Filesystem::getMountManager()->find('/' . $uid . $path);

/**
* @psalm-suppress UndefinedClass
*/
if ($mount instanceof GroupMountPoint) {
Fixed Show fixed Hide fixed
return true;
}

if (\OCP\App::isEnabled("files_external")) {
/** @var GlobalStoragesService $storageService */
$storageService = \OC::$server->get(GlobalStoragesService::class);
Expand Down