Skip to content

Conversation

@MorrisJobke
Copy link
Member

Backport of #3884 and fixes #5636

Vincent Petry and others added 2 commits July 20, 2017 16:29
* 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 <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Jul 20, 2017
@MorrisJobke MorrisJobke added this to the Nextcloud 11.0.4 milestone Jul 20, 2017
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
@codecov
Copy link

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
@rullzer rullzer deleted the 11-backport-3884 branch July 21, 2017 10:40
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 high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants