-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 a single public api for resolving a cloud id to a user and remote and back #3297
Conversation
@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. |
1547393
to
3117228
Compare
3117228
to
acba0cb
Compare
All green, @schiessle @MorrisJobke @rullzer please review |
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 add tests for the new classes
a7b3f80
to
dfaf999
Compare
… and back Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
dfaf999
to
ae66cf8
Compare
Rebased and added tests |
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.
Only minor things mostly, but please add it to lib/private/AppFramework/DependencyInjection/DIContainer
so it can be auto injected in apps
$message = 'Not allowed to create a federated share with the same user.'; | ||
$message_t = $this->l->t('Not allowed to create a federated share with the same user'); | ||
$this->logger->debug($message, ['app' => 'Federated File Sharing']); | ||
throw new \Exception($message_t); | ||
} | ||
|
||
$share->setSharedWith($user . '@' . $remote); | ||
|
||
$share->setSharedWith(rtrim($cloudId->getId(), '/')); |
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.
that should be done by getId()
public function getRemote() { | ||
return $this->remote; | ||
} | ||
} |
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.
missing new line
<?php | ||
/** | ||
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]> | ||
* |
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.
Missing @license GNU AGPL version 3 or any later version
<?php | ||
/** | ||
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]> | ||
* |
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.
Missing @license GNU AGPL version 3 or any later version
* @since 12.0.0 | ||
*/ | ||
public function getRemote(); | ||
} |
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.
new line
<?php | ||
/** | ||
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]> | ||
* |
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.
Missing @license GNU AGPL version 3 or any later version
<?php | ||
/** | ||
* @copyright Copyright (c) 2017, Robin Appelman <[email protected]> | ||
* |
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.
Missing @license GNU AGPL version 3 or any later version
* @since 12.0.0 | ||
*/ | ||
public function isValidCloudId($cloudId); | ||
} |
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.
new line
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
@nickvergessen all fixed |
Codecov Report@@ 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
Continue to review full report at Codecov.
|
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