5 puts
"Usage: suspend_user USER_EMAIL_ADDRESS"
7 puts
"Suspends specified Gitorious user, revoking all access to web UI and git operations."
9 puts
"Account is suspended, can no longer log in and loses current browser session."
10 puts
"SSH keys are revoked, user no longer able to push, pull, clone git repositories"
11 puts
"Committerships and team memberships are removed."
15 puts
"---Loading Gitorious environment---"
16 require File
.dirname(__FILE__
)+'/../config/environment'
17 puts
"---Done loading Gitorious environment---\n\n"
19 def find_user(user_email
)
20 user
= User
.find_by_email(user_email
)
22 puts
"No Gitorious account with email '#{user_email}', exiting..."
28 include Gitorious
::UserAdministration
37 puts
"Suspending '#{user_email}'..."
39 user
= find_user(user_email
)
40 puts
suspend_user(user
)