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

[stable11] Skip null groups in group manager #5813

Merged
merged 4 commits into from Jul 21, 2017

Conversation

Projects
None yet
4 participants
@MorrisJobke
Member

MorrisJobke commented Jul 20, 2017

Backport of #3884 and fixes #5636

PVince81 and others added some commits Jan 19, 2017

Skip null groups in group manager (#26871) (#26956)
* Skip null groups in group manager (#26871)

* Skip null groups in group manager

* Also skip null groups in group manager's search function

* Add more group null checks in sharing code

* Add unit tests for null group safety in group manager

* Add unit tests for sharing code null group checks

* Added tests for null groups handling in sharing code

* Ignore moveShare optional repair in mount provider

In some cases, data is inconsistent in the oc_share table due to legacy
data. The mount provider might attempt to make it consistent but if the
target group does not exist any more it cannot work. In such case we
simply ignore the exception as it is not critical. Keeping the
exception would break user accounts as they would be unable to use
their filesystem.

* Adjust null group handing + tests

* Fix new group manager tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Use DI
Signed-off-by: Joas Schilling <coding@schilljs.com>

@MorrisJobke MorrisJobke added this to the Nextcloud 11.0.4 milestone Jul 20, 2017

@MorrisJobke MorrisJobke requested review from rullzer and nickvergessen Jul 20, 2017

nickvergessen added some commits Mar 17, 2017

Clean up the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
Fix 5.6 duplicate class import
Signed-off-by: Joas Schilling <coding@schilljs.com>
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Jul 20, 2017

Codecov Report

Merging #5813 into stable11 will decrease coverage by 14.41%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##             stable11    #5813       +/-   ##
===============================================
- Coverage       57.43%   43.01%   -14.42%     
+ Complexity      19460    18462      -998     
===============================================
  Files            1215     1207        -8     
  Lines           72676    68114     -4562     
  Branches         1239     1239               
===============================================
- Hits            41739    29298    -12441     
- Misses          30937    38816     +7879
Impacted Files Coverage Δ Complexity Δ
lib/private/Group/Manager.php 73.17% <100%> (-19.08%) 49 <1> (+2)
...iles_sharing/lib/Controller/ShareAPIController.php 87.83% <100%> (ø) 137 <0> (+1) ⬆️
lib/private/Server.php 92.58% <100%> (-0.17%) 119 <0> (ø)
apps/files_sharing/lib/MountProvider.php 95.16% <100%> (+0.33%) 19 <0> (+1) ⬆️
lib/private/Share20/DefaultShareProvider.php 98.7% <100%> (ø) 93 <0> (+1) ⬆️
lib/private/Share20/Manager.php 92.57% <100%> (+0.04%) 207 <0> (+3) ⬆️
...ty/Exceptions/CrossSiteRequestForgeryException.php 0% <0%> (-100%) 1% <0%> (ø)
...pFramework/Db/MultipleObjectsReturnedException.php 0% <0%> (-100%) 1% <0%> (ø)
...mments/tests/Unit/Controller/NotificationsTest.php 0% <0%> (-100%) 4% <0%> (ø)
lib/private/App/CodeChecker/EmptyCheck.php 0% <0%> (-100%) 6% <0%> (ø)
... and 562 more

codecov bot commented Jul 20, 2017

Codecov Report

Merging #5813 into stable11 will decrease coverage by 14.41%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##             stable11    #5813       +/-   ##
===============================================
- Coverage       57.43%   43.01%   -14.42%     
+ Complexity      19460    18462      -998     
===============================================
  Files            1215     1207        -8     
  Lines           72676    68114     -4562     
  Branches         1239     1239               
===============================================
- Hits            41739    29298    -12441     
- Misses          30937    38816     +7879
Impacted Files Coverage Δ Complexity Δ
lib/private/Group/Manager.php 73.17% <100%> (-19.08%) 49 <1> (+2)
...iles_sharing/lib/Controller/ShareAPIController.php 87.83% <100%> (ø) 137 <0> (+1) ⬆️
lib/private/Server.php 92.58% <100%> (-0.17%) 119 <0> (ø)
apps/files_sharing/lib/MountProvider.php 95.16% <100%> (+0.33%) 19 <0> (+1) ⬆️
lib/private/Share20/DefaultShareProvider.php 98.7% <100%> (ø) 93 <0> (+1) ⬆️
lib/private/Share20/Manager.php 92.57% <100%> (+0.04%) 207 <0> (+3) ⬆️
...ty/Exceptions/CrossSiteRequestForgeryException.php 0% <0%> (-100%) 1% <0%> (ø)
...pFramework/Db/MultipleObjectsReturnedException.php 0% <0%> (-100%) 1% <0%> (ø)
...mments/tests/Unit/Controller/NotificationsTest.php 0% <0%> (-100%) 4% <0%> (ø)
lib/private/App/CodeChecker/EmptyCheck.php 0% <0%> (-100%) 6% <0%> (ø)
... and 562 more

@rullzer rullzer merged commit 10a4491 into stable11 Jul 21, 2017

1 check failed

continuous-integration/drone/pr the build failed
Details

@rullzer rullzer deleted the 11-backport-3884 branch Jul 21, 2017

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