-
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
owncloudsql: fix path, naming and listing spaces #4808
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
4844350
to
1bfaac8
Compare
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.
doesn't look harmful ;-)
pkg/rgrpc/todo/pool/selector.go
Outdated
@@ -130,9 +132,15 @@ func (s *Selector[T]) Next(opts ...Option) (T, error) { | |||
|
|||
existingClient, ok := s.clientMap.Load(target) | |||
if ok { | |||
if options.logger != nil { |
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.
We should not allow nil
loggers. The logger
field should default to a noop logger.
pkg/rgrpc/todo/pool/selector.go
Outdated
return existingClient.(T), nil | ||
} | ||
|
||
if options.logger != nil { |
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.
Same here. Expect logger
is not nil
) | ||
|
||
// ListStorageSpaces lists storage spaces according to the provided filters | ||
func (fs *owncloudsqlfs) ListStorageSpaces(ctx context.Context, filter []*provider.ListStorageSpacesRequest_Filter, unrestricted bool) ([]*provider.StorageSpace, error) { | ||
var ( | ||
spaceID = "*" | ||
// uid *userpb.UserId |
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.
Remove comment
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.
not yet. we need to implement the user filter in a subsequent pr. this PR just makes listing spaces and navigating files work again. I'm trying to make things work gradually...
@@ -49,7 +51,7 @@ func (fs *owncloudsqlfs) ListStorageSpaces(ctx context.Context, filter []*provid | |||
case provider.ListStorageSpacesRequest_Filter_TYPE_ID: | |||
_, spaceID, _, _ = storagespace.SplitID(filter[i].GetId().OpaqueId) | |||
case provider.ListStorageSpacesRequest_Filter_TYPE_USER: | |||
_, spaceID, _, _ = storagespace.SplitID(filter[i].GetId().OpaqueId) | |||
// uid = filter[i].GetUser() |
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.
This one also
// if uid != nil && utils.UserIDEqual(uid, u.Id) { | ||
// return nil, errtypes.PermissionDenied("cannot access space of other user?") | ||
// } |
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.
and this
1bfaac8
to
3ef9e6f
Compare
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
3ef9e6f
to
2862bcd
Compare
@dragotin owncloudsql has bitrotted. uploads are still broken, even with this PR. oCIS seems to equire the storage driver to implement listing upload sessions and using the event handler to integrate with postprocessing.
This PR is just the basic fixes to get listing spaces and basic file navigation working again.
why do I still do this? I think being able to switch from oc10 / nc to ocis effortless is a worthwile thing. It would be great if clients could deal with multiple 'personal' spaces, then we could just deploy an owncloudsql storage alongside decomposedfs and then users could migrate at will.
For that a readonly owncloudsql might make sense ... hm ... we could list the owncloudsql spaces as projects ... that only the one user has access to ... 🤔
it any case pls give me a +1 so I can start working on the upload sessions ...