Improved suspend user feature.
authorThomas Kjeldahl Nilsson <thomas@kjeldahlnilsson.net>
Mon, 16 Apr 2012 08:19:28 +0000 (10:19 +0200)
committerThomas Kjeldahl Nilsson <thomas@kjeldahlnilsson.net>
Thu, 26 Apr 2012 18:54:18 +0000 (20:54 +0200)
commit2524188421981ffae7311b984d042d1994505beb
tree6267d8387358b4670fcdd5e9ef11b655d69e6aa3
parent086f65c15d1a4320fe64f0dc4b8b115f09b6ec3f
Improved suspend user feature.

Suspend user logic is moved into new module Gitorious::UserAdministration,
and expanded to clear out ssh keys, cull current session and remove
users committerships and team memberships. All this is reported back in the
web UI after suspension is done. Also added a suspend_user script which takes
the account email address and performs the same suspend operation as the
web UI button.

Also added helper functions to detect of potential orphaned teams, admin-less
teams, which can be acted upon in custom automated workflows where one needs
to ensure that no projects or teams are orphaned when the owner/sole admin
is suspended.
.gitignore
app/controllers/admin/users_controller.rb
config/locales/en.rb
lib/gitorious/user_administration.rb [new file with mode: 0644]
script/create_user [new file with mode: 0755]
script/suspend_user [new file with mode: 0755]
test/unit/lib/gitorious/user_administration_test.rb [new file with mode: 0644]