owncloud / owncloud/ocis

Shared file can't rename using `fileid`

Open
#6,981 1 comment 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug
- Operations like `GET, PROPFIND` can be perform knowing shared resource `fileid` but can't rename

## Steps to reproduce

Steps to reproduce the behavior:

1. user `Alice` create resource `game/some.txt`
2. user `Alice` share resource `game` with user `Einstein`
3. user `Einstein` propfind the file `some.txt` fileid `aafeb67a-4a2a-483a-a91f-f475a8a032f2$4ddb10d2-3237-4be1-ba45-80a06cb76b69!b7b47c0b-d430-4a72-8a7f-69499a6f9715`
4. user `Einstein` get the mount point id of shared folder `game`
```
curl -XGET -vk https://localhost:9200/graph/v1.0/drives -ueintein:relativity
"driveAlias": "mountpoint/game",
"driveType": "mountpoint",
"id": "a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668!aafeb67a-4a2a-483a-a91f-f475a8a032f2:4ddb10d2-3237-4be1-ba45-80a06cb76b69:a9e1f8a3-34a8-46e1-8660-ce8a584bcc62",
"name": "game",
"owner": {
"user": {
"displayName": "",
"id": "4ddb10d2-3237-4be1-ba45-80a06cb76b69"
}
},
```
5. user `Einstein` try to rename `some.txt` to `rename.txt`
```
curl -XMOVE 'https://localhost:9200/remote.php/dav/spaces/aafeb67a-4a2a-483a-a91f-f475a8a032f2$4ddb10d2-3237-4be1-ba45-80a06cb76b69!b7b47c0b-d430-4a72-8a7f-69499a6f9715' \
--header 'Destination: https://localhost:9200/remote.php/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668!aafeb67a-4a2a-483a-a91f-f475a8a032f2%3A4ddb10d2-3237-4be1-ba45-80a06cb76b69%3Aa9e1f8a3-34a8-46e1-8660-ce8a584bcc62/rename.txt' \
```

## Expected behavior
using fileid rename should be possible similar to using the file name
```
curl -XMOVE 'https://localhost:9200/remote.php/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668!aafeb67a-4a2a-483a-a91f-f475a8a032f2%3A4ddb10d2-3237-4be1-ba45-80a06cb76b69%3Aa9e1f8a3-34a8-46e1-8660-ce8a584bcc62/some.txt'
--header 'Destination: https://localhost:9200/remote.php/dav/spaces/a0ca6a90-a365-4782-871e-d44447bbc668!aafeb67a-4a2a-483a-a91f-f475a8a032f2%3A4ddb10d2-3237-4be1-ba45-80a06cb76b69%3Aa9e1f8a3-34a8-46e1-8660-ce8a584bcc62/rename.txt'

Status Code:
201 Created
```

## Actual behavior
```


gateway does not support cross storage move, use copy and delete

```

## Setup
![Screenshot from 2023-08-08 10-23-01](https://github.com/owncloud/ocis/assets/54478846/dccf29e0-1295-4ed2-a76f-7622bbf104cb)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.