Module: tools Branch: master Commit: 2411c853ce53830a32569c22a3b7ec4f08e094b3 URL: http://source.winehq.org/git/tools.git/?a=commit;h=2411c853ce53830a32569c22a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 4 12:14:10 2013 +0200
testbot/Users: Fix the deletion of user accounts.
Users cannot be deleted directly because the Jobs table hold references to them. So mark the accounts as deleted and let the Janitor.pl script delete them when they are not referenced anymore. To do so, transform the 'Active' boolean field into a 'Status' enumeration that can be 'active' (previously Active=Y), 'disabled' (Active=N) or 'deleted'. The Sessions table also contains references to the Users, but these should be deleted together with the user account, which will forcefully log out the user as a side effect.
---
testbot/README | 4 +- testbot/bin/Janitor.pl | 63 +++++++++++++++++++++++++------ testbot/ddl/update25.sql | 17 ++++++++ testbot/ddl/winetestbot.sql | 6 +- testbot/doc/winetestbot-schema.dia | 4 +- testbot/lib/WineTestBot/CGI/Sessions.pm | 11 +++++- testbot/lib/WineTestBot/Users.pm | 17 ++++---- testbot/web/Register.pl | 2 +- testbot/web/admin/UsersList.pl | 4 +- 9 files changed, 98 insertions(+), 30 deletions(-)
Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=2411c853ce53830a32569...