def authorize_web
if session[:user]
- @user = User.find(session[:user], :conditions => {:status => ["active", "confirmed"]})
+ @user = User.find(session[:user], :conditions => {:status => ["active", "confirmed", "suspended"]})
+
+ if @user.status == "suspended"
+ session[:user] = nil
+ session_expires_automatically
+
+ redirect_to :controller => "user", :action => "suspended"
+ end
elsif session[:token]
@user = User.authenticate(:token => session[:token])
session[:user] = @user.id
--- /dev/null
+<% @title = t "user.suspended.title" %>
+
+<h1><%= t "user.suspended.heading" %></h1>
+
+<%= t "user.suspended.body", :webmaster => "webmaster@openstreetmap.org" %>
confirm: Confirm Selected Users
hide: Hide Selected Users
empty: No matching users found
+ suspended:
+ title: Account Suspended
+ heading: Account Suspended
+ body: |
+ <p>
+ Sorry, your account has been automatically suspended due to
+ suspicious activity.
+ </p>
+ <p>
+ This decision will be reviewed by an administrator shortly, or
+ you may contact the <a href="mailto:{{webmaster}}">webmaster</a> if
+ you wish to discuss this.
+ </p>
user_role:
filter:
not_an_administrator: "Only administrators can perform user role management, and you are not an administrator."
map.connect '/user/go_public', :controller => 'user', :action => 'go_public'
map.connect '/user/reset-password', :controller => 'user', :action => 'reset_password'
map.connect '/user/forgot-password', :controller => 'user', :action => 'lost_password'
+ map.connect '/user/suspended', :controller => 'user', :action => 'suspended'
map.connect '/index.html', :controller => 'site', :action => 'index'
map.connect '/edit.html', :controller => 'site', :action => 'edit'