Description
0. Moving the original data from lab1 to new user。
it is very simple. As my code goes, to take everything from root and put to the new user. The delete everything from root.
1. A user desires to change their username
Find all events under the original name. Put all of the events again under new name and delete the previous events. Delete the old token and change to the new token.
2. A user desires to change their password
Create a new user record with the same name and new password. Delete the old record. Since the name is not changed, the events don’t need to change. The session doesn’t need to change as well.
3. A user desires to delete their account and all associated data
Find all data and the user account and delete them all. Delete the session.
4. A user loses their password
Since the password is encrypted at the beginning, there is no other way but to remember the password. Or the user will not get his data back.
5. A user has their password stolen and used by someone else
We can do the same as change password. Create a new user record with the same name and new password. Delete the old record. Since the name is not changed, the events don’t need to change. The session doesn’t need to change as well.
The thing that suprises me is that changing password is the easieat case to deal with. This is great because changing password is very common.




Reviews
There are no reviews yet.