diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-02 17:33:42 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-02 17:33:42 +0100 |
commit | 10141ed04af966ee280dcea1d733e0b036127afc (patch) | |
tree | 21dd6e4f4ece87288424fce7fdb866378c0edc5b /lib/mauve/web_interface.rb | |
parent | 25b32914b72a5f709eca773f3511cc89c2e710c2 (diff) | |
parent | f07c5705d4ec82f4ba851409d4a92a9f66820df8 (diff) |
merge
Diffstat (limited to 'lib/mauve/web_interface.rb')
-rw-r--r-- | lib/mauve/web_interface.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb index 4bb9517..9369ee3 100644 --- a/lib/mauve/web_interface.rb +++ b/lib/mauve/web_interface.rb @@ -103,11 +103,12 @@ EOF # Uh-oh.. Intruder alert! # ok_urls = %w(/ /login /logout) + no_redirect_urls = %w(/ajax) unless ok_urls.include?(request.path_info) flash['error'] = "You must be logged in to access that page." status 403 - redirect "/login?next_page=#{request.path_info}" + redirect "/login?next_page=#{request.path_info}" unless no_redirect_urls.any?{|u| /^#{u}/ =~ request.path_info } end end end @@ -230,7 +231,7 @@ EOF end end - flash["errors"] = "Failed to acknowledge #{failed.length} alerts." if failed.length > 0 + flash["error"] = "Failed to acknowledge #{failed.length} alerts." if failed.length > 0 flash["notice"] = "Successfully acknowledged #{succeeded.length} alerts" if succeeded.length > 0 redirect "/alerts/raised" @@ -267,7 +268,6 @@ EOF get '/ajax/time_to_s_human/:seconds' do content_type :text - secs = params[:seconds].to_i Time.at(secs).to_s_human end |