-
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
Sharemanager api changes #2121
Sharemanager api changes #2121
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. |
536e416
to
84425be
Compare
@butonic thanks for the heads-up! |
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.
Please have a look at butonic#193
Fix Nextcloud-related changes in cs3org#2121
@michielbdejong Great! Thx! |
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.
Changes in pkg/share/manager/nextcloud LGTM now!
Note that this PR still needs cs3org/cs3apis#144 ... which has a failing CI ... urgh ... I'll take care of that...
|
318cb8c
to
c7a99e2
Compare
The next step for the shares storahge provider is to introduce field masks so the shares can update state and mount point. This PR is based on the full changeset, but removes everything but the API change. Add a sharesstorageprovider The provider exposes all received shares. It can be mounted to /home/Shares to make a lot of special cases for shares handling in the gateway and storage drivers superfluous. Add missing mock file Implement methods for setting/unsetting arbitrary metadata Fix tests Adapt to changes from rebase Fix creating references with embedded mounts Fix corner cases when stating shares Allow moves between shares on the same storage Make the storage rules known to the gateway as well Do not choke on non-existent shares Reject a share when it is being deleted Fix rebase artifacts WIP: Refactor statting shares. Merge shares permissions. update after rebase, fix tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> list all shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> work on api change Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> Fix build Persist mountpoints in the share managers followin the new cs3 api Add support for renaming shares in the SharesStorageprovider Adapt commands for updating received shares Regenerate the share manager mock Fix linter warning Do not raise an internal error when trying to access non-existent shares Make hound happy Fix wrong column name in query Fix typo Do not confuse user and group names Add test for listing received group shares Do not list parent group shares if there is a child share for it already Make hound happy Hide the fact that accepted groups shares can be child shares in the db list shares using the shares manager + hide group shares when the same resource has a user and group share refactor all the ocs error writing from the new code Only collide with mountpoints of shares pointing do different resources Also return shares being shared with one of the user's groups Add sharesstorageprovider service file for local acceptance tests Adapt nextcloud share manager to new method signature Also remove the test for UpdateReceivedShare which can not be tested anymore with the new signature. The ReceivedShare never held the display name that's being tested so the test only passed on the data from the update field, but since the method only takes the actual received share now this is no longer possible. WIP: use go-cs3apis fork until it has been merged Add placeholder changelog to make CI run Tweak documentation on how to run the acceptance tests Add missing storage registry rule for the sharesstorageprovider Fix revad config for local acceptance tests reduce changes to share api change Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> JSON encode the FieldMask parameter as-is paramsObj.Ref -> paramsObj.ReceivedShare Restore deleted test update code comment remove go mod replace Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
c7a99e2
to
d7e2e9f
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.
I checked it too, LGTM
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.
@butonic looks pretty good, can you just add back the NotSupported
error handling of updating the display name in gateway/UpdateReceivedOCMShare
and gateway/UpdateReceivedShare
?
Ah okay. You call that |
This PR introduces the filed mask to the UpdateReceivedShare APIs. This is a breaking change but we tried to change all user and ocm shareprovider managers to use tha field mask.
Unfortunately, the nextcloud driver internally seems to pass on the internal struct. @michielbdejong could you check we correctly implemented a backwards compatible change?
This PR is based on #2023 but reverts everything but the api change.
cc @aduffeck @labkode