nextcloud / nextcloud/files_lock
Refactor command to not require user_id and/or to make it more apparent it's a required parameter
Open
Nobody has claimed this yet.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 39
- Forks
- 10
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 48
Description
Cannot unlock file within groupfolder
unlocking File #4376970
In Root.php line 345:
[OC\User\NoUserException]
Backends provided no user object
Exception trace:
at /var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/Root.php:345
OC\Files\Node\Root->getUserFolder() at n/a:n/a
call_user_func_array() at /var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/LazyFolder.php:64
OC\Files\Node\LazyFolder->__call() at /var/www/cloud.nextcloud.com/nextcloud/lib/private/Files/Node/LazyRoot.php:38
OC\Files\Node\LazyRoot->getUserFolder() at /var/www/cloud.nextcloud.com/nextcloud/apps/files_lock/lib/Service/FileService.php:47
OCA\FilesLock\Service\FileService->getFileFromId() at /var/www/cloud.nextcloud.com/nextcloud/apps/files_lock/lib/Service/LockService.php:262
OCA\FilesLock\Service\LockService->unlockFile() at /var/www/cloud.nextcloud.com/nextcloud/apps/files_lock/lib/Command/Lock.php:205
OCA\FilesLock\Command\Lock->unlockFile() at /var/www/cloud.nextcloud.com/nextcloud/apps/files_lock/lib/Command/Lock.php:116
OCA\FilesLock\Command\Lock->execute() at /var/www/cloud.nextcloud.com/nextcloud/3rdparty/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at /var/www/cloud.nextcloud.com/nextcloud/core/Command/Base.php:161
OC\Core\Command\Base->run() at /var/www/cloud.nextcloud.com/nextcloud/3rdparty/symfony/console/Application.php:1078
Symfony\Component\Console\Application->doRunCommand() at /var/www/cloud.nextcloud.com/nextcloud/3rdparty/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at /var/www/cloud.nextcloud.com/nextcloud/3rdparty/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at /var/www/cloud.nextcloud.com/nextcloud/lib/private/Console/Application.php:183
OC\Console\Application->run() at /var/www/cloud.nextcloud.com/nextcloud/console.php:87
require_once() at /var/www/cloud.nextcloud.com/nextcloud/occ:11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/files_lock/lib/Command/Lock.php, especially the unlockFile and execute paths shown in the trace, then follow how apps/files_lock/lib/Service/FileService.php and LockService.php use user_id. Make the command behavior clear when user_id is required or allow the relevant operation without it, and verify that unlocking a groupfolder file no longer reaches the NoUserException shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100