Commit 4957c4c19926c933ca34e64b1b841b9876df2821

Authored by Antonio Terceiro
1 parent e91dcd17

ActionItem305: filtering out forbidden logins

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
script/import-cooperation.net
... ... @@ -62,6 +62,9 @@ class Progress
62 62 end
63 63 end
64 64  
  65 +FORBIDDEN_LOGINS = %w[
  66 + info
  67 +]
65 68 Progress.instance.start(ARGV.size)
66 69 for username in ARGV
67 70 Progress.instance.step
... ... @@ -73,6 +76,10 @@ for username in ARGV
73 76  
74 77 # create user
75 78 login = username.gsub(/@.*$/, '')
  79 + if FORBIDDEN_LOGINS.include?(login)
  80 + $stderr.puts "E: not importing #{username}, #{login} is not an allowed login"
  81 + next
  82 + end
76 83 user = User.new(:login => login, :email => username, :environment => environment)
77 84  
78 85 # import person data
... ...