Skip to content

Conversation

@smesterheide
Copy link
Contributor

Summary

The PR aims to add a new share type for remote groups on multiple federated NC instances.

Changes

  • New NC shareType federated_group and corresponding OCM shareType federation
  • CloudFederationProvider are registered for a resourceType and shareType instead of a resourceType (file) alone.
  • Migration for share_external table
    • The user column length is increased from 64 to 255 characters to allow long group names

TODO

  • ...

Checklist

@smesterheide smesterheide requested review from a team and nickvergessen as code owners May 20, 2025 14:18
@smesterheide smesterheide requested review from ArtificialOwl, artonge, leftybournes, nfebe and szaimen and removed request for a team May 20, 2025 14:18
@szaimen szaimen removed their request for review May 21, 2025 12:37
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]>
@smesterheide smesterheide force-pushed the feat/vo-federation-features branch from 3a5b87e to bfac1be Compare May 21, 2025 13:29
@miaulalala
Copy link
Contributor

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!

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

@smesterheide
Copy link
Contributor Author

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!

Hi @miaulalala this PR adds support for a new share type TYPE_FEDERATED_GROUP which is implemented by the VO federation app. The share type allows federated group shares with more than one remote server. The other changes facilitate the use of the new share type. Thanks for reaching out. I hope we can some traction. :)

@smesterheide smesterheide force-pushed the feat/vo-federation-features branch from 2cd9ea5 to d4a1525 Compare August 11, 2025 08:19
@skjnldsv skjnldsv added enhancement 2. developing Work in progress feature: sharing needs review Needs review to determine if still applicable or covered by other Issues labels Aug 19, 2025
@smesterheide
Copy link
Contributor Author

@susnux @skjnldsv Is there anything to improve this PR or make it easier for you to review?

Comment on lines +171 to +173
if ($shareType === 'federation') {
// Allow creation of pending shares by federation provider
}
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor

@susnux susnux left a 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;
Copy link
Contributor

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

@AndyScherzinger
Copy link
Member

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

@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

Copy link
Member

@provokateurin provokateurin left a 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.

Comment on lines +58 to +64
if (!$table->hasColumn('remote_share_type')) {
$table->addColumn('remote_share_type', Types::INTEGER, [
'notnull' => false,
'length' => 4,
]);
$changed = true;
}
Copy link
Member

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

Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// OCM proposel, currently only supported by Nextcloud
// OCM proposal, currently only supported by Nextcloud

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

Breaking change, not allowed

Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @since 32.0.0
* @since 33.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress enhancement feature: sharing feedback-requested needs review Needs review to determine if still applicable or covered by other Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants