-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add new share type for federated groups #34132
Add new share type for federated groups #34132
Conversation
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.
Psalm found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
4ce8730
to
0e094a6
Compare
lib/private/Collaboration/Collaborators/FederatedGroupPlugin.php
Outdated
Show resolved
Hide resolved
/compile-amend / |
Related branch on application side: https://github.com/nextcloud/vo_federation/tree/wip/share-provider |
Question: |
@@ -69,6 +70,8 @@ | |||
private $circlesAreNotAvailable = false; | |||
/** @var \OCA\Talk\Share\RoomShareProvider */ | |||
private $roomShareProvider = null; | |||
/** @var \OCA\VO_Federation\FederatedGroupShareProvider */ |
Check failure
Code scanning / Psalm
UndefinedDocblockClass
/** | ||
* Create the federated group share provider | ||
* | ||
* @return FederatedGroupShareProvider |
Check failure
Code scanning / Psalm
UndefinedDocblockClass
try { | ||
$this->federatedGroupShareProvider = $this->serverContainer->query('\OCA\VO_Federation\FederatedGroupShareProvider'); | ||
} catch (\OCP\AppFramework\QueryException $e) { | ||
return null; |
Check failure
Code scanning / Psalm
NullableReturnStatement
} | ||
} | ||
|
||
return $this->federatedGroupShareProvider; |
Check failure
Code scanning / Psalm
InvalidReturnStatement
I can't say something about the code as such, this is something @come-nc and others have to decide. But the general structure and the introduction of the share type "IShare::TYPE_FEDERATED_GROUP" looks fine to me |
@@ -69,6 +70,8 @@ class ProviderFactory implements IProviderFactory { | |||
private $circlesAreNotAvailable = false; | |||
/** @var \OCA\Talk\Share\RoomShareProvider */ | |||
private $roomShareProvider = null; | |||
/** @var \OCA\VO_Federation\FederatedGroupShareProvider */ |
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.
Usually we would use the registerProvider
function here to dynamically register our provider from our Application.php
As it turns out the ProviderFactory is also required by remote.php during WebDAV share mounts where normal app bootstrapping is skipped.
e55f2e6
to
373ad1d
Compare
Can you please run |
$result['share_with'] = $share->getSharedWith(); | ||
$result['share_with_displayname'] = $group !== null ? $group->getDisplayName() : $share->getSharedWith(); | ||
try { | ||
$result = array_merge($result, $this->getFederatedGroupShareHelper()->formatShare($share)); |
Check failure
Code scanning / Psalm
UndefinedDocblockClass
*/ | ||
private function getFederatedGroupShareHelper() { | ||
if (!$this->appManager->isEnabledForUser('vo_federation')) { | ||
throw new QueryException(); |
Check failure
Code scanning / Psalm
UndefinedDocblockClass
|
||
return $this->serverContainer->get('\OCA\VO_Federation\Sharing\ShareAPIHelper'); | ||
} | ||
|
Check notice
Code scanning / Psalm
DeprecatedClass
016ff53
to
0c5c6a1
Compare
Hi @smesterheide If you want to spark a conversation again, because it actually fit another feature, feel free to do so, we'll be happy to talk and assist you! :) |
Summary
The PR aims to add a new share type for remote groups on multiple federated NC instances.
Changes
CloudFederationProvider
are registered for a resourceType and shareType instead of a resourceType (file) alone.TODO
Checklist