finished admin filter and write-up for issue #6

This commit is contained in:
Ken Johnson
2013-06-04 11:49:59 -04:00
parent b0ace5ebef
commit 089e9540ac
3 changed files with 47 additions and 6 deletions
+2 -2
View File
@@ -18,13 +18,13 @@ class ApplicationController < ActionController::Base
end
def is_admin?
admin = current_user.admin if current_user
current_user.admin if current_user
end
def administrative
if not is_admin?
reset_session
redirect_to login_path
redirect_to root_url
end
end