Skip to content

Properly handle deleted users in UserMountCache#3888

Closed
MorrisJobke wants to merge 1 commit into
masterfrom
downstream-27028
Closed

Properly handle deleted users in UserMountCache#3888
MorrisJobke wants to merge 1 commit into
masterfrom
downstream-27028

Conversation

@MorrisJobke

Copy link
Copy Markdown
Member

When encountering entries from a deleted user, discard such entries.

@icewind1991 Does that make sense? You added the array_filter before and upstream added the deletion as well.

@mention-bot

Copy link
Copy Markdown

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

@MorrisJobke
MorrisJobke requested a review from icewind1991 March 17, 2017 00:29
When encountering entries from a deleted user, discard such entries.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
private function dbRowToMountInfo(array $row) {
$user = $this->userManager->get($row['user_id']);
if (is_null($user)) {
// user does not exist any more, delete all mounts of that user directly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So in case your user backend (like ldap) has a hick-up or is temporarily wrong configured, everything will be whiped?
Sounds a bit odd, not sure if we should do this. I agree with the rest of this PR, but I'm not a friend of this delete query.

@icewind1991 icewind1991 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would be better to just delete the rows when a user is deleted

@MorrisJobke

Copy link
Copy Markdown
Member Author

Would be better to just delete the rows when a user is deleted

@icewind1991 Could you create a PR for that?

@MorrisJobke MorrisJobke added 1. to develop Accepted and waiting to be taken care of and removed 3. to review Waiting for reviews labels Mar 22, 2017
@MorrisJobke

Copy link
Copy Markdown
Member Author

@icewind1991 Could you create a PR for that?

Or adjust this PR. Maybe the unit tests are still valid.

@MorrisJobke MorrisJobke closed this Aug 8, 2017
@MorrisJobke
MorrisJobke deleted the downstream-27028 branch August 8, 2017 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. to develop Accepted and waiting to be taken care of feature: filesystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants