Content
View differences
Updated by Wieland Lindenthal about 3 years ago
### Steps to reproduce
1. Mount a SMB share into Nextcloud containing a file e.g. `Nextcloud Manual.pdf`
2. Login as a user with permissions to access work-packages and Nextcloud
3. 2. Go to work package and link the an existing file in Nextcloud like `Nextcloud Manual.pdf` Manual.pdf` in your Home
4. 3. Logout
5. 4. Log in as a different user than in step 1 with permissions to access work-packages and Nextcloud with the SMB share.
6. 5. Goto work packages from step 2.
7. 6. Try to access file from step 2.
### What is the buggy behavior?
* The link is not accessible to the user from step 4.
* If it is clicked by the user from step 4 a file not found error is shown.
### What is the expected behavior?
1. The link is accessible to the user from step 4
### Notes
The file is in Nextcloud is accessible for by both users. The file is located in a user specific storage (eg. Home or external SMB share. share)
The problem results from the use of `origin_id` in OpenProject. Openproject creates from the `origin_id` `orign_id` a URL like `https://my.cloud.com/f/{origin_id}`
The origin ID is related to the `fileid` in Nextclouds filecache. But this cache has have for every user a uniqe id per user for the same file.
So it is not possible to access this file by origin\_id/fileid.
### **Possible Solution:**
May be it is possible to use the `path_hash` to access files in Nextcloud or using the whole path like [`https://my.cloud.com/apps/files/?dir=/test/sub/dok.pdf`](https://my.cloud.com/apps/files/?dir=/test/sub/dok.pdf) Nextcloud it does.
###
**OpenProject installation type**
* [ ] Hosted cloud edition
* [x] Packaged installation
* What distribution?: Ubuntu 20.04
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
_If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.5.3_
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Nextcloud Version**
25.0.6
1. Mount a SMB share into Nextcloud containing a file e.g. `Nextcloud Manual.pdf`
2. Login as a user with permissions to access work-packages and Nextcloud
3.
4.
5.
6.
7.
### What is the buggy behavior?
* The link is not accessible to the user from step 4.
* If it is clicked by the user from step 4 a file not found error is shown.
### What is the expected behavior?
1. The link is accessible to the user from step 4
### Notes
The file
The problem results from the use of `origin_id` in OpenProject. Openproject creates from the `origin_id`
The origin ID is related to the `fileid` in Nextclouds filecache. But this cache has
So it is not possible to access this file by origin\_id/fileid.
### **Possible Solution:**
May be it is possible to use the `path_hash` to access files in Nextcloud or using the whole path like [`https://my.cloud.com/apps/files/?dir=/test/sub/dok.pdf`](https://my.cloud.com/apps/files/?dir=/test/sub/dok.pdf) Nextcloud it does.
###
**OpenProject installation type**
* [ ] Hosted cloud edition
* [x] Packaged installation
* What distribution?: Ubuntu 20.04
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
_If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.5.3_
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Nextcloud Version**
25.0.6