Skip to content

Also delete objectstore data on user deletion - #15147

Closed
rullzer wants to merge 1 commit into
masterfrom
fix/9690/delete_objectstore_data_on_user_deletion
Closed

Also delete objectstore data on user deletion#15147
rullzer wants to merge 1 commit into
masterfrom
fix/9690/delete_objectstore_data_on_user_deletion

Conversation

@rullzer

Copy link
Copy Markdown
Member

Fixes#9690

As there is no local data we have to explictly delete the data from the
objectstore.

Now this might time out if you do it via web. Maybe we should add a
warning there if you do not use local storage?

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

As there is no local data we have to explictly delete the data from the
objectstore.
Now this might time out if you do it via web. Maybe we should add a
warning there if you do not use local storage?
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzerrullzer added bug 3. to review Waiting for reviews labels Apr 17, 2019
@rullzerrullzer added this to the Nextcloud 17 milestone Apr 17, 2019

// Delete all files
if (!$userRoot->getStorage()->instanceOfStorage(Local::class)) {
$userRoot->delete();

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.

Should we just do that for all OS and then drop the lines 231 to 236?

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.

or should we do this in a background job?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Yes that was also my consideration.

So then deleting the user is:

  1. Disabling the user
  2. Setting a special flag
  3. Scheduling backgroundjob

Because we need to fetch the actual user to do the deletion. Else we can't fetch the storage etc.

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.

Makes sense 👍

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.

But this is something for master. This can go in like that for the back ports and then we add the background job for master.

@MorrisJobke

Copy link
Copy Markdown
Member

I'm fine with this for back porting and doing a background job and unified handling of this across all primary storages for master.

@juliusknorrjuliusknorr 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.

Makes sense 👍

@MorrisJobke

Copy link
Copy Markdown
Member

CI fails on PHPUnit tests

@MorrisJobkeMorrisJobke mentioned this pull request Jul 15, 2019
28 tasks
@MorrisJobke

Copy link
Copy Markdown
Member

CI fails on PHPUnit tests

🏓

@rullzer

Copy link
Copy Markdown
MemberAuthor

Actually the more I think about it the more it will most likely timeout. If you try to do this from the user management. Let me move this to 18 and see if we can soon come up with a proper backportable way that won't time out and do 💥

@rullzerrullzer closed this Nov 6, 2019
@rullzer
rullzer deleted the fix/9690/delete_objectstore_data_on_user_deletion branch November 6, 2019 09:20
@JUVOJustin

Copy link
Copy Markdown

Is this already implemented in nc 17 and 18? As far as i can see, this bug still exists. Take a look at #9690

@IIPoliII

Copy link
Copy Markdown

For me on NC 20 the issue is still present...

@IIPoliIIIIPoliII left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This fix works for me ....

@IIPoliIIIIPoliII left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Works great but only using php-cli without timeout

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

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

occ user:delete does not remove storage and files where using Swift as primary store

6 participants

@rullzer@MorrisJobke@JUVOJustin@IIPoliII@ChristophWurst@juliusknorr