core icon indicating copy to clipboard operation
core copied to clipboard

Deleted user can log in

Open jnfrmarks opened this issue 12 years ago • 13 comments

Steps to reproduce

  1. In browser 1, as the admin user, create a new user
  2. In browser 2, log in as the new user to validate the account and then log out
  3. Back in browser 1, delete the user but do not refresh or add a new user. At the top of the screen is the deleted user message with the undo link. There is no timer for how long a user is kept in the undo buffer and the message is there until the admin refreshes or does another action.
  4. Back in browser 2, log in again as the deleted user. The user is able to log in

Expected behaviour

The deleted user should not be able to log in. There should be a timeout period on keeping the user information in the undo buffer.

Actual behaviour

The deleted user can log in.

Server configuration

ownCloud version: (see ownCloud admin page)

ownCloud 7.0.1 (daily) Build:2014-08-20T03:18:51+00:00

jnfrmarks avatar Aug 20 '14 21:08 jnfrmarks

Can you clarify step 3, did you actually trigger the user deletion by leaving the page ? Or you didn't and what you are saying is that it's a usability issue where an admin could forget that logic ?

PVince81 avatar Aug 21 '14 14:08 PVince81

Wouldn't the better way to handle this be to soft delete them until the admin leaves the page? That would make the user account unusable while still on the page. But it would require an extra column in the users table though.

we should also be careful that when we remove a user we invalidate their sessions

th3fallen avatar Aug 21 '14 16:08 th3fallen

I did not leave the admin page after deleting the user. There is a message in the browser that the user has been deleted though so I assumed the user was removed.

jnfrmarks avatar Sep 04 '14 20:09 jnfrmarks

https://github.com/owncloud/core/issues/6229 Duplicate.

The system is functioning as built, but this delayed delete creates a bug from an admin perspective - after all the user was deleted. See thread in #6229 . We need to introduce the 7 second rule as discussed.

@jancborchardt

MTRichards avatar Sep 05 '14 02:09 MTRichards

This is not a duplicate of https://github.com/owncloud/core/issues/6229, only related to it.

Currently as far as I know, the user is immediately deleted on clicking delete. Anything else is a bug. @blizzz @raghunayyar

jancborchardt avatar Sep 05 '14 08:09 jancborchardt

No, the user is only marked for deletion. If you he would, all his data would have been wiped already. Really best thing is to countdown the delete action with the somewhere suggested 7 sec time period.

blizzz avatar Sep 05 '14 09:09 blizzz

Best answer is a longer term add to a delete list, that you then view and approve so you don't accidentally delete. But for now, this makes sense as a short term fix. Ideally we can also get multi-select in the updated delete in the future.

MTRichards avatar Sep 05 '14 12:09 MTRichards

Needs a release note to be sure users and admins know what this entails.

MTRichards avatar Sep 05 '14 13:09 MTRichards

Also if you delete two users in a row the notification disappears, no way to undo :frowning:

What's the expected behavior when deleting multiple users ? Currently as soon as you delete the second user, the first one gets deleted and the second one stays pending (undo opportunity).

For simplicity I suggest to keep the current approach. It would work this way:

  1. Admin deletes "user1", undo notification appears
  2. Ajax request is made to the server for permanent deletion as soon as: a) 7 seconds have elapsed b) admin leaves the page c) admin deletes another user

In the case of c), another notification will appear with its own 7 seconds.

PVince81 avatar Sep 11 '14 10:09 PVince81

And... the notification does not appear on master, but does on 7.0.2. Another regression :frowning:

I'll have a go at fixing this.

PVince81 avatar Sep 11 '14 10:09 PVince81

  1. Admin deletes "user1", undo notification appears
  2. Ajax request is made to the server for permanent deletion as soon as: a) 7 seconds have elapsed b) admin leaves the page c) admin deletes another user

@PVince81 that works in the short run!

MTRichards avatar Sep 11 '14 11:09 MTRichards

Fix is here: https://github.com/owncloud/core/pull/11023 Adds the 7 seconds timeout. With bonus unit tests!

PVince81 avatar Sep 11 '14 14:09 PVince81

#11023 has been merged. Closing this therefore.

LukasReschke avatar Sep 29 '14 10:09 LukasReschke