-
Notifications
You must be signed in to change notification settings - Fork 113
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
sharestorageprovider: Stat resource when resolving share by path #4561
Conversation
We're already using a State based filter in the ListReceivedShares request. No need to manually check for that again.
When resolving a received shared by mountpath, make sure that the shared resource actually exists. This avoids issues with dangling shares for already delete resources using the same mountpoint. Fixes: owncloud/ocis#7895
@@ -261,7 +261,23 @@ var _ = Describe("Sharesstorageprovider", func() { | |||
}, | |||
} | |||
default: | |||
if req.Ref.ResourceId.OpaqueId == "shareddir-merged" { | |||
switch req.Ref.ResourceId.OpaqueId { | |||
case "shareddir", "shareddir2": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to provide the constants for the "shareddir", "shareddir2", "shareddir-merged"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the surrounding code, especially the outer switch statement, I'd say: no 😃
More seriously I guess the mocks could benefit from some refactoring, but I think the string constants are the least of on an issue.
When resolving a received shared by mountpath, make sure that the shared resource actually exists. This avoids issues with dangling shares for already delete resources using the same mountpoint.
Fixes: owncloud/ocis#7895