Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
21548bd
feat: allow specifying applicable users and groups in the files_exter…
icewind1991 Jul 22, 2026
2da28a1
fix(setup): stop redirect after CAN_INSTALL removal failure
joshtrichards Aug 1, 2026
5f93c67
fix(core): improve app icon contrast in the app menu
pringelmann Aug 5, 2026
133b3e5
fix(sharing): properly handle verification of copy/move actions
susnux Jul 31, 2026
5dfaa5b
refactor(settings): migrate Users form sub-components to script setup
pringelmann Jun 5, 2026
35bd5b3
refactor(settings): migrate UserRowActions to script setup
pringelmann Jun 5, 2026
7cfbac2
refactor(settings): migrate user dialogs to script setup
pringelmann Jun 5, 2026
6015abc
refactor(settings): migrate UserRow to script setup
pringelmann Jun 5, 2026
444bcf0
refactor(settings): migrate UserList to script setup
pringelmann Jun 5, 2026
0861fed
test(settings): adapt dialog specs to script-setup migration
pringelmann Jun 18, 2026
3ae1573
chore(assets): recompile assets
pringelmann Aug 5, 2026
988cd7f
Merge pull request #62871 from nextcloud/fix/sharing-copy-move
susnux Aug 5, 2026
eea37c9
chore: build assets
pringelmann Aug 5, 2026
b2de7e3
Merge pull request #62431 from nextcloud/external-create-applicable
CarlSchwan Aug 5, 2026
4144ce0
Merge pull request #61064 from nextcloud/refactor/40903/user-manageme…
pringelmann Aug 5, 2026
f2a0bb5
Merge pull request #62765 from nextcloud/jtr/fix-setup-canInstall-fai…
susnux Aug 5, 2026
b3004aa
fix(l10n): Update translations from Transifex
nextcloud-bot Aug 6, 2026
4999cd8
Merge pull request #62931 from nextcloud/fix/62728/app-icon-contrast
pringelmann Aug 6, 2026
0cd4ece
fix(console): write app command loading errors to stderr
printminion-co Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/dav/lib/Connector/Sabre/ServerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ public function createServer(
$server->addPlugin(new SharesPlugin(
$tree,
$this->userSession,
\OCP\Server::get(\OCP\Share\IManager::class)
\OCP\Server::get(\OCP\Share\IManager::class),
\OCP\Server::get(IRootFolder::class),
));
$server->addPlugin(new CommentPropertiesPlugin(\OCP\Server::get(ICommentsManager::class), $this->userSession));
$server->addPlugin(new FilesReportPlugin(
Expand Down
32 changes: 28 additions & 4 deletions apps/dav/lib/Connector/Sabre/SharesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use OCA\DAV\Connector\Sabre\Node as DavNode;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\ISharedStorage;
Expand Down Expand Up @@ -52,6 +53,7 @@ public function __construct(
private Tree $tree,
IUserSession $userSession,
private IManager $shareManager,
private IRootFolder $rootFolder,
) {
$this->userId = $userSession->getUser()->getUID();
}
Expand Down Expand Up @@ -84,7 +86,7 @@ public function initialize(Server $server) {
* @param Node $node
* @return IShare[]
*/
private function getShare(Node $node): array {
private function getShare(Node $node, bool $includeIncoming = true): array {
$result = [];
$requestedShareTypes = [
IShare::TYPE_USER,
Expand All @@ -106,6 +108,10 @@ private function getShare(Node $node): array {
-1
);

if (!$includeIncoming) {
continue;
}

// Also check for shares where the user is the recipient
try {
$result[] = $this->shareManager->getSharedWith(
Expand All @@ -122,6 +128,24 @@ private function getShare(Node $node): array {
return array_merge(...$result);
}

/**
* @return IShare[]
*/
private function getSharesForTarget(Node $node): array {
$shares = $this->getShare($node);
if ($shares !== []) {
return $shares;
}

// also check the owner side
$userRoot = $this->rootFolder->getUserFolder($this->userId);
while (str_starts_with($node->getPath(), $userRoot->getPath() . '/')) {
$shares = array_merge($shares, $this->getShare($node, false));
$node = $node->getParent();
}
return $shares;
}

/**
* @param Folder $node
* @return IShare[][]
Expand Down Expand Up @@ -237,8 +261,8 @@ public function validateMoveOrCopy(string $source, string $target): bool {
return true;
}

$targetShares = $this->getShare($targetNode->getNode());
if (empty($targetShares)) {
$targetShares = $this->getSharesForTarget($targetNode->getNode());
if ($targetShares === []) {
// Target is not a share so no re-sharing inprogress
return true;
}
Expand All @@ -259,7 +283,7 @@ public function validateMoveOrCopy(string $source, string $target): bool {
// the user moving the file out of the share to their home storage would give them share permissions and allow moving into the share
//
// since the 2-step move is allowed, we also allow both steps at once
if ($sourceNode->isDeletable()) {
if ($sourceNode->getInternalPath() !== '' && $sourceNode->isDeletable()) {
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public function __construct(
$this->server->tree,
$userSession,
$shareManager,
\OCP\Server::get(IRootFolder::class),
));
$this->server->addPlugin(new CommentPropertiesPlugin(
\OCP\Server::get(ICommentsManager::class),
Expand Down
6 changes: 5 additions & 1 deletion apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use OCA\DAV\Connector\Sabre\SharesPlugin;
use OCA\DAV\Upload\UploadFile;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\IUser;
use OCP\IUserSession;
use OCP\Share\IManager;
Expand All @@ -28,13 +29,15 @@ class SharesPluginTest extends \Test\TestCase {
private \Sabre\DAV\Server $server;
private \Sabre\DAV\Tree&MockObject $tree;
private \OCP\Share\IManager&MockObject $shareManager;
private IRootFolder&MockObject $rootFolder;
private SharesPlugin $plugin;

protected function setUp(): void {
parent::setUp();
$this->server = new \Sabre\DAV\Server();
$this->tree = $this->createMock(Tree::class);
$this->shareManager = $this->createMock(IManager::class);
$this->rootFolder = $this->createMock(IRootFolder::class);
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getUID')
Expand All @@ -47,7 +50,8 @@ protected function setUp(): void {
$this->plugin = new SharesPlugin(
$this->tree,
$userSession,
$this->shareManager
$this->shareManager,
$this->rootFolder,
);
$this->plugin->initialize($this->server);
}
Expand Down
29 changes: 29 additions & 0 deletions apps/files_external/lib/Command/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use OCA\Files_External\Service\StoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\AppFramework\Http;
use OCP\IGroupManager;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\User\Exceptions\UserNotFoundException;
Expand All @@ -35,6 +36,7 @@ public function __construct(
private IUserManager $userManager,
private IUserSession $userSession,
private BackendService $backendService,
private IGroupManager $groupManager,
) {
parent::__construct();
}
Expand Down Expand Up @@ -76,6 +78,18 @@ protected function configure(): void {
'',
InputOption::VALUE_NONE,
'Don\'t save the created mount, only list the new mount'
)
->addOption(
'applicable-user',
'',
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
'Add a user as applicable to the newly created mount'
)
->addOption(
'applicable-group',
'',
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED,
'Add a group as applicable to the newly created mount'
);
parent::configure();
}
Expand All @@ -87,6 +101,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$storageIdentifier = $input->getArgument('storage_backend');
$authIdentifier = $input->getArgument('authentication_backend');
$configInput = $input->getOption('config');
$applicableUsers = $input->getOption('applicable-user');
$applicableGroups = $input->getOption('applicable-group');

$storageBackend = $this->backendService->getBackend($storageIdentifier);
$authBackend = $this->backendService->getAuthMechanism($authIdentifier);
Expand Down Expand Up @@ -129,6 +145,19 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$mount->setAuthMechanism($authBackend);
$mount->setBackendOptions($config);

foreach ($applicableUsers as $applicableUser) {
if (!$this->userManager->userExists($applicableUser)) {
$output->writeln('<error>Unknown user "' . $applicableUser . '"</error>');
}
}
foreach ($applicableGroups as $applicableGroup) {
if (!$this->groupManager->groupExists($applicableGroup)) {
$output->writeln('<error>Unknown group "' . $applicableGroup . '"</error>');
}
}
$mount->setApplicableUsers($applicableUsers);
$mount->setApplicableGroups($applicableGroups);

if ($user) {
if (!$this->userManager->userExists($user)) {
$output->writeln('<error>User "' . $user . '" not found</error>');
Expand Down
1 change: 1 addition & 0 deletions apps/profile/l10n/lt_LT.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OC.L10N.register(
"You have not added any info yet" : "Jūs kol kas nesate pridėję jokios informacijos",
"{user} has not added any info yet" : "Naudotojas {user} kol kas nėra pridėjęs jokios informacijos",
"Error opening the user status modal, try hard refreshing the page" : "Klaida atidarant naudotojo būsenos modalinį langą, pabandykite atnaujinti puslapį",
"Edit profile" : "Redaguoti profilį",
"The headline and about sections will show up here" : "Čia bus rodoma santrauka apie jus bei kita su jumis susijusi informacija",
"Profile not found" : "Profilis nerastas",
"The profile does not exist or is unavailable." : "Profilis neegzistuoja arba yra nepasiekiamas.",
Expand Down
1 change: 1 addition & 0 deletions apps/profile/l10n/lt_LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"You have not added any info yet" : "Jūs kol kas nesate pridėję jokios informacijos",
"{user} has not added any info yet" : "Naudotojas {user} kol kas nėra pridėjęs jokios informacijos",
"Error opening the user status modal, try hard refreshing the page" : "Klaida atidarant naudotojo būsenos modalinį langą, pabandykite atnaujinti puslapį",
"Edit profile" : "Redaguoti profilį",
"The headline and about sections will show up here" : "Čia bus rodoma santrauka apie jus bei kita su jumis susijusi informacija",
"Profile not found" : "Profilis nerastas",
"The profile does not exist or is unavailable." : "Profilis neegzistuoja arba yra nepasiekiamas.",
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/l10n/lt_LT.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/settings/l10n/lt_LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"The \"overwrite.cli.url\" option in your config.php is set to \"%s\" which is a correct URL. Suggested URL is \"%s\"." : "Jūsų failo „config.php“ parinktis „overwrite.cli.url“ yra nustatyta kaip „%s“, o tai yra teisingas URL. Siūlomas URL yra „%s“.",
"Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"%s\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "Būtinai nustatykite „overwrite.cli.url“ parametrą failo „config.php“ taip, kad jis atitiktų URL adresą, kurį jūsų vartotojai dažniausiai naudoja prisijungdami prie šio „Nextcloud“. Rekomendacija: „%s“. Kitaip gali kilti problemų generuojant URL adresą per „cron“. (Tačiau gali būti, kad siūlomas URL adresas nėra tas, kurį jūsų vartotojai dažniausiai naudoja prisijungdami prie šio „Nextcloud“. Bet kuriuo atveju geriausia tai patikrinti.)",
"PHP APCu configuration" : "PHP APCu konfigūracija",
"Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Jūsų APCu tarpinės talpa yra beveik išnaudota, todėl rekomenduojame padidinti PHP parametrą „apc.shm_size“.",
"Your APCu cache has been running full, consider increasing the apc.shm_size php setting." : "Jūsų APCu tarpinė atmintis yra beveik išnaudota, todėl rekomenduojame padidinti PHP parametrą „apc.shm_size“.",
"Your APCu cache is almost full at %s%%, consider increasing the apc.shm_size php setting." : " Jūsų APCu tarpinė atmintis yra beveik užpildyta %s%%, todėl rekomenduojame padidinti PHP parametrą „apc.shm_size“.",
"PHP default charset" : "PHP numatytasis simbolių rinkinys",
"PHP configuration option \"default_charset\" should be UTF-8" : "PHP konfigūracijos parametras „default_charset“ turėtų būti nustatytas kaip UTF-8",
Expand Down
Loading
Loading