Content
View differences
Updated by Wieland Lindenthal over 2 years ago
### Steps to reproduce
_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_
1. Run `integration_openproject` in Nextcloud 27.0.2
2. Share a folder by link with _Allow upload and editing_ permissions
3. put some files in the folder
4. visit the link share (without logged in session in Nextcloud) and try to delete a file
5. see error.
### What is the buggy behavior?
_Please describe the bug in as much detail as possible. Example:_
* Deleting files via link share is not possible when `integration_openproject` 2.4.4 is enabled
### What is the expected behavior?
_Describe how the application should behave like. Example:_
1. Deleting files via link share should be possible when `integration_openproject` is enabled
### Important note
_\-_
### **Logs**
```log
\`\`\`
Sep 21 09:59:08 nc01 Nextcloud[102374]: {"reqId":"2URIM9IjfPr51oH9aFbK","level":3,"time":"2023-09-21T09:59:08+02:00","remoteAddr":"2003:...","user":"--","app":"webdav","method":"DELETE","url":"/public.php/webdav/easyroam/easyroam_root_ca.pem","message":"{\"Exception\":\"Error\",\"Message\":\"Call Nextcloud\[102374\]: {"reqId":"2URIM9IjfPr51oH9aFbK","level":3,"time":"2023-09-21T09:59:08+02:00","remoteAddr":"2003:...","user":"--","app":"webdav","method":"DELETE","url":"/public.php/webdav/easyroam/easyroam\_root\_ca.pem","message":"{\\"Exception\\":\\"Error\\",\\"Message\\":\\"Call to a member function getUID() on null\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php\",\"line\":86,\"function\":\"handle\",\"class\":\"OCA\\\\OpenProject\\\\Listener\\\\BeforeNodeInsideOpenProjectGroupfilderChangedListener\",\"type\":\"->\",\"args\":[[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"]]},{\"file\":\"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php\",\"line\":251,\"function\":\"__invoke\",\"class\":\"OC\\\\EventDispatcher\\\\ServiceEventListener\",\"type\":\"->\",\"args\":[[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"],\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\",[\"Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher\"]]},{\"file\":\"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php\",\"line\":73,\"function\":\"callListeners\",\"class\":\"Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher\",\"type\":\"->\",\"args\":[[[\"Closure\"],[\"Closure\"],[\"Closure\"]],\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\",[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php\",\"line\":94,\"function\":\"dispatch\",\"class\":\"Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher\",\"type\":\"->\",\"args\":[[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"],\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php\",\"line\":106,\"function\":\"dispatch\",\"class\":\"OC\\\\EventDispatcher\\\\EventDispatcher\",\"type\":\"->\",\"args\":[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\",[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/Node/HookConnector.php\",\"line\":149,\"function\":\"dispatchTyped\",\"class\":\"OC\\\\EventDispatcher\\\\EventDispatcher\",\"type\":\"->\",\"args\":[[\"OCP\\\\Files\\\\Events\\\\Node\\\\BeforeNodeDeletedEvent\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/legacy/OC_Hook.php\",\"line\":105,\"function\":\"delete\",\"class\":\"OC\\\\Files\\\\Node\\\\HookConnector\",\"type\":\"->\",\"args\":[[true,\"/Test/easyroam/easyroam_root_ca.pem\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":1257,\"function\":\"emit\",\"class\":\"OC_Hook\",\"type\":\"::\",\"args\":[\"OC_Filesystem\",\"delete\",[true,\"/Test/easyroam/easyroam_root_ca.pem\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":1126,\"function\":\"runHooks\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[[\"delete\"],\"/Test/easyroam/easyroam_root_ca.pem\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":692,\"function\":\"basicOperation\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[\"unlink\",\"/easyroam/easyroam_root_ca.pem\",[\"delete\"]]},{\"file\":\"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php\",\"line\":536,\"function\":\"unlink\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[\"/easyroam/easyroam_root_ca.pem\"]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php\",\"line\":179,\"function\":\"delete\",\"class\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File\",\"type\":\"->\",\"args\":[]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\",\"line\":281,\"function\":\"delete\",\"class\":\"Sabre\\\\DAV\\\\Tree\",\"type\":\"->\",\"args\":[\"easyroam/easyroam_root_ca.pem\"]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\",\"line\":89,\"function\":\"httpDelete\",\"class\":\"Sabre\\\\DAV\\\\CorePlugin\",\"type\":\"->\",\"args\":[[\"Sabre\\\\HTTP\\\\Request\"],[\"Sabre\\\\HTTP\\\\Response\"]]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":472,\"function\":\"emit\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[\"method:DELETE\",[[\"Sabre\\\\HTTP\\\\Request\"],[\"Sabre\\\\HTTP\\\\Response\"]]]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":253,\"function\":\"invokeMethod\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[[\"Sabre\\\\HTTP\\\\Request\"],[\"Sabre\\\\HTTP\\\\Response\"]]},{\"file\":\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\",\"line\":321,\"function\":\"start\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[]},{\"file\":\"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php\",\"line\":123,\"function\":\"exec\",\"class\":\"Sabre\\\\DAV\\\\Server\",\"type\":\"->\",\"args\":[]},{\"file\":\"/var/www/html/nextcloud/public.php\",\"line\":81,\"args\":[\"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php\"],\"function\":\"require_once\"}],\"File\":\"/var/www/html/nextcloud/apps/integration_openproject/lib/Listener/BeforeNodeInsideOpenProjectGroupfilderChangedListener.php\",\"Line\":53,\"message\":\"Call null\\",\\"Code\\":0,\\"Trace\\":\[{\\"file\\":\\"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php\\",\\"line\\":86,\\"function\\":\\"handle\\",\\"class\\":\\"OCA\\\\\\\\OpenProject\\\\\\\\Listener\\\\\\\\BeforeNodeInsideOpenProjectGroupfilderChangedListener\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php\\",\\"line\\":251,\\"function\\":\\"\_\_invoke\\",\\"class\\":\\"OC\\\\\\\\EventDispatcher\\\\\\\\ServiceEventListener\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\],\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\",\[\\"Symfony\\\\\\\\Component\\\\\\\\EventDispatcher\\\\\\\\EventDispatcher\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php\\",\\"line\\":73,\\"function\\":\\"callListeners\\",\\"class\\":\\"Symfony\\\\\\\\Component\\\\\\\\EventDispatcher\\\\\\\\EventDispatcher\\",\\"type\\":\\"->\\",\\"args\\":\[\[\[\\"Closure\\"\],\[\\"Closure\\"\],\[\\"Closure\\"\]\],\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\",\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php\\",\\"line\\":94,\\"function\\":\\"dispatch\\",\\"class\\":\\"Symfony\\\\\\\\Component\\\\\\\\EventDispatcher\\\\\\\\EventDispatcher\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\],\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php\\",\\"line\\":106,\\"function\\":\\"dispatch\\",\\"class\\":\\"OC\\\\\\\\EventDispatcher\\\\\\\\EventDispatcher\\",\\"type\\":\\"->\\",\\"args\\":\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\",\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/Files/Node/HookConnector.php\\",\\"line\\":149,\\"function\\":\\"dispatchTyped\\",\\"class\\":\\"OC\\\\\\\\EventDispatcher\\\\\\\\EventDispatcher\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"OCP\\\\\\\\Files\\\\\\\\Events\\\\\\\\Node\\\\\\\\BeforeNodeDeletedEvent\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/legacy/OC\_Hook.php\\",\\"line\\":105,\\"function\\":\\"delete\\",\\"class\\":\\"OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\HookConnector\\",\\"type\\":\\"->\\",\\"args\\":\[\[true,\\"/Test/easyroam/easyroam\_root\_ca.pem\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/Files/View.php\\",\\"line\\":1257,\\"function\\":\\"emit\\",\\"class\\":\\"OC\_Hook\\",\\"type\\":\\"::\\",\\"args\\":\[\\"OC\_Filesystem\\",\\"delete\\",\[true,\\"/Test/easyroam/easyroam\_root\_ca.pem\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/Files/View.php\\",\\"line\\":1126,\\"function\\":\\"runHooks\\",\\"class\\":\\"OC\\\\\\\\Files\\\\\\\\View\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"delete\\"\],\\"/Test/easyroam/easyroam\_root\_ca.pem\\"\]},{\\"file\\":\\"/var/www/html/nextcloud/lib/private/Files/View.php\\",\\"line\\":692,\\"function\\":\\"basicOperation\\",\\"class\\":\\"OC\\\\\\\\Files\\\\\\\\View\\",\\"type\\":\\"->\\",\\"args\\":\[\\"unlink\\",\\"/easyroam/easyroam\_root\_ca.pem\\",\[\\"delete\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php\\",\\"line\\":536,\\"function\\":\\"unlink\\",\\"class\\":\\"OC\\\\\\\\Files\\\\\\\\View\\",\\"type\\":\\"->\\",\\"args\\":\[\\"/easyroam/easyroam\_root\_ca.pem\\"\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php\\",\\"line\\":179,\\"function\\":\\"delete\\",\\"class\\":\\"OCA\\\\\\\\DAV\\\\\\\\Connector\\\\\\\\Sabre\\\\\\\\File\\",\\"type\\":\\"->\\",\\"args\\":\[\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php\\",\\"line\\":281,\\"function\\":\\"delete\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\Tree\\",\\"type\\":\\"->\\",\\"args\\":\[\\"easyroam/easyroam\_root\_ca.pem\\"\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php\\",\\"line\\":89,\\"function\\":\\"httpDelete\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\CorePlugin\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Request\\"\],\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Response\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\\",\\"line\\":472,\\"function\\":\\"emit\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\Server\\",\\"type\\":\\"->\\",\\"args\\":\[\\"method:DELETE\\",\[\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Request\\"\],\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Response\\"\]\]\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\\",\\"line\\":253,\\"function\\":\\"invokeMethod\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\Server\\",\\"type\\":\\"->\\",\\"args\\":\[\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Request\\"\],\[\\"Sabre\\\\\\\\HTTP\\\\\\\\Response\\"\]\]},{\\"file\\":\\"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php\\",\\"line\\":321,\\"function\\":\\"start\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\Server\\",\\"type\\":\\"->\\",\\"args\\":\[\]},{\\"file\\":\\"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php\\",\\"line\\":123,\\"function\\":\\"exec\\",\\"class\\":\\"Sabre\\\\\\\\DAV\\\\\\\\Server\\",\\"type\\":\\"->\\",\\"args\\":\[\]},{\\"file\\":\\"/var/www/html/nextcloud/public.php\\",\\"line\\":81,\\"args\\":\[\\"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php\\"\],\\"function\\":\\"require\_once\\"}\],\\"File\\":\\"/var/www/html/nextcloud/apps/integration\_openproject/lib/Listener/BeforeNodeInsideOpenProjectGroupfilderChangedListener.php\\",\\"Line\\":53,\\"message\\":\\"Call to a member function getUID() on null\",\"exception\":{},\"CustomMessage\":\"Call null\\",\\"exception\\":{},\\"CustomMessage\\":\\"Call to a member function getUID() on null\"}","userAgent":"Mozilla/5.0 null\\"}","userAgent":"Mozilla/5.0 (X11; Linux x86_64) x86\_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.0.2.1"}
```
Safari/537.36","version":"27.0.2.1"}
\`\`\`
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
**OpenProject installation type**
* [ ] Hosted cloud edition
* [x] Packaged installation
* RHEL
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
* integration\_openproject 2.4.4
* Nextcloud 27.0.2
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Language**
_German, English_
2. Share a folder by link with _Allow upload and editing_ permissions
3. put some files in the folder
4. visit the link share (without logged in session in Nextcloud) and try to delete a file
5. see error.
### What is the buggy behavior?
### What is the expected behavior?
###
_\-_
###
```log
```
\`\`\`
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
**OpenProject installation type**
* [ ] Hosted cloud edition
* [x] Packaged installation
* RHEL
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
* integration\_openproject 2.4.4
* Nextcloud 27.0.2
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Language**
_German, English_