Deleted user can log in
Steps to reproduce
- In browser 1, as the admin user, create a new user
- In browser 2, log in as the new user to validate the account and then log out
- 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.
- 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
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 ?
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
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.
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
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
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.
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.
Needs a release note to be sure users and admins know what this entails.
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:
- Admin deletes "user1", undo notification appears
- 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.
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.
- Admin deletes "user1", undo notification appears
- 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!
Fix is here: https://github.com/owncloud/core/pull/11023 Adds the 7 seconds timeout. With bonus unit tests!
#11023 has been merged. Closing this therefore.