-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add new share type federated_group and provider for VO app #52992
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
base: master
Are you sure you want to change the base?
Add new share type federated_group and provider for VO app #52992
Conversation
Signed-off-by: Sandro Mesterheide <[email protected]> Add support for share type federated_group in files_sharing app Signed-off-by: Sandro Mesterheide <[email protected]> Add share type support for federation providers Signed-off-by: Sandro Mesterheide <[email protected]> Add migration for share_external table Signed-off-by: Sandro Mesterheide <[email protected]> fix currentUser reference php-cs-fixer psalm feedback Co-authored-by: Dirk Olbertz <[email protected]> Signed-off-by: Sandro Mesterheide <[email protected]>
3a5b87e to
bfac1be
Compare
|
Hi @smesterheide , thanks for opening this PR! I unfortunately was unable compile the entire discussion surrounding the old PR, so I am curious about your use case. From what I can tell, we already support federated group shares. Is there an issue with federated group shares that you're trying to address? Thanks a lot! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Hi @miaulalala this PR adds support for a new share type |
lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php
Outdated
Show resolved
Hide resolved
apps/files_sharing/lib/Migration/Version26000Date20230117143027.php
Outdated
Show resolved
Hide resolved
Signed-off-by: Sandro Mesterheide <[email protected]>
2cd9ea5 to
d4a1525
Compare
| if ($shareType === 'federation') { | ||
| // Allow creation of pending shares by federation provider | ||
| } |
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.
?
susnux
left a 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.
I am not sure that we want to integrate this into Nextclouds public server core for an app that is not accessible on our appstore ( https://apps.nextcloud.com/apps/vo_federation seems to be orphaned ) as we only did integrations like this for Nextcloud managed apps like Deck, Talk, and Teams (Circles). But this has to be decided by others.
cc @sorbaugh @AndyScherzinger
| * Extension to remote group share | ||
| * @since 32.0.0 | ||
| */ | ||
| public const TYPE_FEDERATED_GROUP = 14; |
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.
If this is for an external app then the name of the type should reflect this - if this is a general type such as per OCM and there are multiple apps that potentially implement this then its fine I guess
@susnux we have to take over maintenance for both part app and core, hence we will ship the app in the future, hence also fix the publishing situation around the app store |
provokateurin
left a 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.
Like the code says: Note to developers: Do not add new share types here.
It's impossible to say if this PR makes sense, if we don't have access to a recent working version vo_federation.
We also want to get rid of the share provider concept as it currently exists, as it is not very performant and also leads to a lot of copy-paste code (like we see in this PR).
If the mentioned proposal is going to be part of OCM, it should just be implemented in the existing cloud_federation_api app.
| if (!$table->hasColumn('remote_share_type')) { | ||
| $table->addColumn('remote_share_type', Types::INTEGER, [ | ||
| 'notnull' => false, | ||
| 'length' => 4, | ||
| ]); | ||
| $changed = true; | ||
| } |
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.
The table already has a column share_type
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.
Should be an outlined icon as per our new icon guidelines
| if ($shareType === 'group' || $shareType === IShare::TYPE_REMOTE_GROUP) { | ||
| $this->share['shareType'] = 'group'; | ||
| } elseif ($shareType === 'federation' || $shareType === IShare::TYPE_FEDERATED_GROUP) { | ||
| // OCM proposel, currently only supported by Nextcloud |
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.
| // OCM proposel, currently only supported by Nextcloud | |
| // OCM proposal, currently only supported by Nextcloud |
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.
Also, where can we find this OCM proposal?
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.
Breaking change, not allowed
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.
Also breaking changes
|
|
||
| /** | ||
| * Extension to remote group share | ||
| * @since 32.0.0 |
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.
| * @since 32.0.0 | |
| * @since 33.0.0 |
Summary
The PR aims to add a new share type for remote groups on multiple federated NC instances.
Changes
CloudFederationProviderare registered for a resourceType and shareType instead of a resourceType (file) alone.TODO
Checklist