Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow moves #4284

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Disallow moves #4284

merged 3 commits into from
Oct 27, 2023

Conversation

aduffeck
Copy link
Contributor

We no longer allow moves between shares, even if they resolve to the same space.

@@ -591,6 +591,12 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide
Interface("destination", req.Destination).
Msg("sharesstorageprovider: Got Move request")

if !utils.ResourceIDEqual(req.Source.ResourceId, req.Destination.ResourceId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies that Source and Destination are relative references, right? Can't I move them by specific ids only? Wouldn't this fail then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. The sharesstorageprovider works with references where the storage and space ids are hardcoded values and the opaque id is the encoded resource id of the shared resource (in the form <storageid>:<spaceid>:<opaqueid>. The actual referenced resource is selected by path, so it's always gonna be a relative reference.

@aduffeck aduffeck merged commit a0a3e4f into cs3org:edge Oct 27, 2023
8 of 9 checks passed
@aduffeck aduffeck deleted the disallow-moves branch October 27, 2023 08:17
@aduffeck aduffeck mentioned this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants