From b3dc5378e5c09e91956aa899a6d71f0fc790de5e Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 5 Nov 2012 14:50:13 -0800 Subject: Unit test for is_admin? --- users/app/controllers/controller_extension/authentication.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'users/app/controllers') diff --git a/users/app/controllers/controller_extension/authentication.rb b/users/app/controllers/controller_extension/authentication.rb index 598d8a9..e27b4da 100644 --- a/users/app/controllers/controller_extension/authentication.rb +++ b/users/app/controllers/controller_extension/authentication.rb @@ -20,6 +20,7 @@ module ControllerExtension::Authentication end def access_denied + # TODO: should we redirect to the root_url in either case, and have the root_url include the login screen (and also ability to create unauthenticated tickets) when no user is logged in? redirect_to login_url, :alert => "Not authorized" if !logged_in? redirect_to root_url, :alert => "Not authorized" if logged_in? end -- cgit v1.2.3