aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-01 15:35:05 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-01 15:35:05 +0100
commitb718175601c02b8a251931622e7b79f469645111 (patch)
tree672e361498f33e0e3287cca05939c754630a1e81 /lib
parent5f57bc117ff110d21fe6c130816c208c35f0b987 (diff)
Updated interface to auto-update nicely.
Diffstat (limited to 'lib')
-rw-r--r--lib/mauve/web_interface.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb
index bd1ceb9..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"