-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Skip null groups in group manager #3884
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
Conversation
MorrisJobke
commented
Mar 17, 2017
- downstream of Skip null groups in group manager (#26871) owncloud/core#26956
|
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rullzer, @nickvergessen and @schiessle to be potential reviewers. |
* 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]>
4ea3c61 to
377fdf3
Compare
|
|
||
| if ($checkGroups && $share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) { | ||
| $sharedWith = $this->groupManager->get($share->getSharedWith()); | ||
| $user = $this->userManager->get($this->currentUser); |
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.
We could also save this call for $sharedWith === null
But since this is only for an error case it's probably okay
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
nickvergessen
left a comment
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.
Added DI and fixed some code styling in the test
|
Breaks with php5.6: |
Signed-off-by: Joas Schilling <[email protected]>
|
@karlitschek A backport to 11 of this is needed for #5636 - opened in #5636 |
|
please backport 👍 |