Content
View differences
Updated by Wieland Lindenthal about 3 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. Login as a user with permissions to access work-packages and Nextcloud nextcloud
2. Go to work package and link an existing file in Nextcloud nextcloud like `Nextcloud Manual.pdf` in your Home
3. Logout
4. Log in as a different user than in step 1 with permissions to access work-packages and Nextcloud nextcloud
5. Goto work packages from step 2.
6. Try to access file from step 2.
### What is the buggy behavior?
_Please describe the bug in as much detail as possible. Example:_
* 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?
_Describe how the application should behave like. Example:_
1. The link is accessible to the user from step 4
### Important note
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, but no longer add any new images or other attachments. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
### Notes
The file is in Nextcloud nextcloud accessible by both users. The file is located in a user specific storage (eg. Home or external SMB share)
The problem results from the use of `origin_id` in OpenProject. openproject. Openproject creates from the `orign_id` a URL like `https://my.cloud.com/f/{origin_id}`
The origin ID is related to the `fileid` in Nextclouds nextclouds filecache. But this cache have for every user a uniqe id 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 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 nexztcloud it does.
###
**Logs**
_Are there errors in the browser console? (_[_Click here for information on how to open your browser's console_](https://webmasters.stackexchange.com/a/77337)_) For a local installation: Are there relevant logs output by_ `_openproject logs_` _(packaged installation) (_[_click here for details_](https://docs.openproject.org/installation-and-operations/operation/monitoring/#show-logs)_) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable_
### Screenshots and other files
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
### 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
* 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
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._
2. Go to work package and link an existing file in Nextcloud
3. Logout
4. Log in as a different user than in step 1 with permissions to access work-packages and Nextcloud
5. Goto work packages from step 2.
6. Try to access file from step 2.
### What is the buggy behavior?
* If it is clicked by the user from step 4 a file not found error is shown.
### What is the expected behavior?
###
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, but no longer add any new images or other attachments. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
###
The file is in Nextcloud
The problem results from the use of `origin_id` in OpenProject.
The origin ID is related to the `fileid` in Nextclouds
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
###
_Are there errors in the browser console? (_[_Click here for information on how to open your browser's console_](https://webmasters.stackexchange.com/a/77337)_) For a local installation: Are there relevant logs output by_ `_openproject logs_` _(packaged installation) (_[_click here for details_](https://docs.openproject.org/installation-and-operations/operation/monitoring/#show-logs)_) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable_
### Screenshots and other files
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
* [ ] 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
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._