Skip to content

Conversation

@icewind1991
Copy link
Member

Instead of having at least 3 different implementations that might not all behave in the same way.

Additionally, having a single api point makes it easier to add more "fancy" ways to resolve the cloud id such as the various ways described in #782

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jan 27, 2017
@icewind1991 icewind1991 added this to the Nextcloud 12.0 milestone Jan 27, 2017
@mention-bot
Copy link

@icewind1991, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @LukasReschke and @schiessle to be potential reviewers.

@icewind1991
Copy link
Member Author

All green, @schiessle @MorrisJobke @rullzer please review

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Please add tests for the new classes

Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
@icewind1991
Copy link
Member Author

Rebased and added tests

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Only minor things mostly, but please add it to lib/private/AppFramework/DependencyInjection/DIContainer so it can be auto injected in apps


$share->setSharedWith($user . '@' . $remote);

$share->setSharedWith(rtrim($cloudId->getId(), '/'));
Copy link
Member

Choose a reason for hiding this comment

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

that should be done by getId()

public function getRemote() {
return $this->remote;
}
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

missing new line

<?php
/**
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]>
*
Copy link
Member

Choose a reason for hiding this comment

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

Missing @license GNU AGPL version 3 or any later version

<?php
/**
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]>
*
Copy link
Member

Choose a reason for hiding this comment

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

Missing @license GNU AGPL version 3 or any later version

* @since 12.0.0
*/
public function getRemote();
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

new line

<?php
/**
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]>
*
Copy link
Member

Choose a reason for hiding this comment

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

Missing @license GNU AGPL version 3 or any later version

<?php
/**
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]>
*
Copy link
Member

Choose a reason for hiding this comment

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

Missing @license GNU AGPL version 3 or any later version

* @since 12.0.0
*/
public function isValidCloudId($cloudId);
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

new line

Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
@icewind1991
Copy link
Member Author

@nickvergessen all fixed

@codecov-io
Copy link

Codecov Report

Merging #3297 into master will decrease coverage by -0.04%.

@@             Coverage Diff              @@
##             master    #3297      +/-   ##
============================================
- Coverage     54.21%   54.17%   -0.04%     
- Complexity    20987    21042      +55     
============================================
  Files          1304     1306       +2     
  Lines         80105    80336     +231     
  Branches       1253     1253              
============================================
+ Hits          43426    43526     +100     
- Misses        36679    36810     +131
Impacted Files Coverage Δ Complexity Δ
apps/federatedfilesharing/lib/Notifier.php 0% <ø> (ø) 24 <7> (ø)
...es_sharing/lib/Activity/Providers/RemoteShares.php 0% <ø> (ø) 15 <1> (+1)
...ederatedfilesharing/lib/BackgroundJob/RetryJob.php 0% <ø> (ø) 10 <ø> (ø)
ocs/v1.php 0% <ø> (ø) 0 <ø> (ø)
apps/files_sharing/lib/External/MountProvider.php 100% <100%> (ø) 4 <1> (ø)
lib/private/Share20/ProviderFactory.php 88.75% <100%> (+0.28%) 23 <ø> (ø)
lib/private/Server.php 92.62% <100%> (-0.13%) 120 <1> (+1)
...s/federatedfilesharing/lib/AppInfo/Application.php 93.93% <100%> (+0.39%) 6 <ø> (ø)
apps/federatedfilesharing/lib/AddressHandler.php 92.3% <100%> (-3.01%) 13 <ø> (-11)
lib/private/Federation/CloudIdManager.php 100% <100%> (ø) 15 <15> (?)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a591ce...0d8d658. Read the comment docs.

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

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants