From b5c202ef401ba2d27def465da4a5e9d565a23978 Mon Sep 17 00:00:00 2001 From: cktricky Date: Fri, 11 Jul 2014 06:38:36 -0400 Subject: [PATCH] Resolves issue #138 --- app/controllers/admin_controller.rb | 2 +- public/Log | 211 ++++++++++++++++++++++++++++ 2 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 public/Log diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index f82afc5..055e9c5 100755 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,5 +1,5 @@ class AdminController < ApplicationController - before_filter :administrative, :if => :admin_param + before_filter :administrative, :if => :admin_param, :except => [:get_user] skip_before_filter :has_info def dashboard diff --git a/public/Log b/public/Log new file mode 100644 index 0000000..9b6688e --- /dev/null +++ b/public/Log @@ -0,0 +1,211 @@ +Started GET "/admin/" for 127.0.0.1 at 2014-07-10 12:17:47 -0400 + +AbstractController::ActionNotFound - The action 'index' could not be found for AdminController: + actionpack (3.2.11) lib/abstract_controller/base.rb:116:in `process' + actionpack (3.2.11) lib/abstract_controller/rendering.rb:45:in `process' + actionpack (3.2.11) lib/action_controller/metal.rb:203:in `dispatch' + actionpack (3.2.11) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' + actionpack (3.2.11) lib/action_controller/metal.rb:246:in `block in action' + actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:73:in `dispatch' + actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:36:in `call' + journey (1.0.4) lib/journey/router.rb:68:in `block in call' + journey (1.0.4) lib/journey/router.rb:56:in `call' + actionpack (3.2.11) lib/action_dispatch/routing/route_set.rb:601:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' + rack (1.4.0) lib/rack/conditionalget.rb:25:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/head.rb:14:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/params_parser.rb:21:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/flash.rb:242:in `call' + rack (1.4.0) lib/rack/session/abstract/id.rb:205:in `context' + rack (1.4.0) lib/rack/session/abstract/id.rb:200:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/cookies.rb:341:in `call' + activerecord (3.2.11) lib/active_record/query_cache.rb:64:in `call' + activerecord (3.2.11) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' + activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `_run__434169162507012719__call__3468834369286166293__callbacks' + activesupport (3.2.11) lib/active_support/callbacks.rb:405:in `__run_callback' + activesupport (3.2.11) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' + activesupport (3.2.11) lib/active_support/callbacks.rb:81:in `run_callbacks' + actionpack (3.2.11) lib/action_dispatch/middleware/callbacks.rb:27:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/reloader.rb:65:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' + better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call' + better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call' + better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.11) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.11) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.0) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.0) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.0) lib/rack/lock.rb:15:in `call' + rack-livereload (0.3.15) lib/rack/livereload.rb:23:in `_call' + rack-livereload (0.3.15) lib/rack/livereload.rb:14:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call' + railties (3.2.11) lib/rails/engine.rb:479:in `call' + railties (3.2.11) lib/rails/application.rb:223:in `call' + railties (3.2.11) lib/rails/railtie/configurable.rb:30:in `method_missing' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:147:in `handle' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:99:in `rescue in block (2 levels) in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:96:in `block (2 levels) in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:86:in `block in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:66:in `start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:13:in `run' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/bin/nack_worker:4:in `
' + + + +Started POST "/__better_errors/70252101132480/variables" for 127.0.0.1 at 2014-07-10 12:17:47 -0400 + + +Started GET "/admina/" for 127.0.0.1 at 2014-07-10 12:17:54 -0400 + +ActionController::RoutingError (No route matches [GET] "/admina"): + actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' + railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app' + railties (3.2.11) lib/rails/rack/logger.rb:16:in `block in call' + activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in `tagged' + railties (3.2.11) lib/rails/rack/logger.rb:16:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call' + rack (1.4.0) lib/rack/methodoverride.rb:21:in `call' + rack (1.4.0) lib/rack/runtime.rb:17:in `call' + activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call' + rack (1.4.0) lib/rack/lock.rb:15:in `call' + rack-livereload (0.3.15) lib/rack/livereload.rb:23:in `_call' + rack-livereload (0.3.15) lib/rack/livereload.rb:14:in `call' + actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call' + railties (3.2.11) lib/rails/engine.rb:479:in `call' + railties (3.2.11) lib/rails/application.rb:223:in `call' + railties (3.2.11) lib/rails/railtie/configurable.rb:30:in `method_missing' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:147:in `handle' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:99:in `rescue in block (2 levels) in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:96:in `block (2 levels) in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:86:in `each' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:86:in `block in start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:66:in `loop' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:66:in `start' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/lib/nack/server.rb:13:in `run' + /Users/cktricky/Library/Application Support/Pow/Versions/0.4.0/node_modules/nack/bin/nack_worker:4:in `
' + + + Rendered /Users/cktricky/.rvm/gems/ruby-2.1.2@railsgoat/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.5ms) + +Started GET "/logout" for 127.0.0.1 at 2014-07-10 14:08:58 -0400 +Connecting to database specified by database.yml +Processing by SessionsController#destroy as HTML + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 1 LIMIT 1 +  (0.0ms) begin transaction + SQL (5.4ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:08:58 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", "http://railsgoat.dev/admin/1/dashboard"], ["updated_at", Thu, 10 Jul 2014 18:08:58 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (0.7ms) commit transaction +Redirected to http://railsgoat.dev/ +Completed 302 Found in 77ms (ActiveRecord: 8.7ms) + + +Started GET "/" for 127.0.0.1 at 2014-07-10 14:08:58 -0400 +Processing by SessionsController#new as HTML +  (0.0ms) begin transaction + SQL (0.3ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:08:58 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", "http://railsgoat.dev/admin/1/dashboard"], ["updated_at", Thu, 10 Jul 2014 18:08:58 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (16.5ms) commit transaction + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered sessions/new.html.erb within layouts/application (3.0ms) + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered layouts/tutorial/_header.html.erb (4.3ms) + Rendered layouts/tutorial/_sidebar.html.erb (7.6ms) + Rendered layouts/shared/_messages.html.erb (1.1ms) + Rendered layouts/shared/_footer.html.erb (0.6ms) +Completed 200 OK in 211ms (Views: 191.1ms | ActiveRecord: 17.1ms) + +Started GET "/admin/1/dashboard" for 127.0.0.1 at 2014-07-10 14:09:03 -0400 +Processing by AdminController#dashboard as HTML + Parameters: {"admin_id"=>"1"} + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 +Redirected to http://railsgoat.dev/?url=%2Fadmin%2F1%2Fdashboard +Filter chain halted as :authenticated rendered or redirected +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) + +Started GET "/?url=%2Fadmin%2F1%2Fdashboard" for 127.0.0.1 at 2014-07-10 14:09:03 -0400 +Processing by SessionsController#new as HTML + Parameters: {"url"=>"/admin/1/dashboard"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:09:03 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", nil], ["updated_at", Thu, 10 Jul 2014 18:09:03 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (16.9ms) commit transaction + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered sessions/new.html.erb within layouts/application (1.4ms) + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered layouts/tutorial/_header.html.erb (1.4ms) + Rendered layouts/tutorial/_sidebar.html.erb (2.4ms) + Rendered layouts/shared/_messages.html.erb (0.0ms) + Rendered layouts/shared/_footer.html.erb (0.0ms) +Completed 200 OK in 42ms (Views: 22.2ms | ActiveRecord: 17.7ms) + +Started POST "/sessions" for 127.0.0.1 at 2014-07-10 14:09:11 -0400 +Processing by SessionsController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"94Qz/Yhpb9NXODcUfhSp3wicaeu6YWRLJBmBgqDEHSE=", "url"=>"/admin/1/dashboard", "email"=>"ken@metacorp.com", "password"=>"[FILTERED]", "commit"=>"Login"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:09:11 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", "http://railsgoat.dev/?url=%2Fadmin%2F1%2Fdashboard"], ["updated_at", Thu, 10 Jul 2014 18:09:11 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (15.8ms) commit transaction + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'ken@metacorp.com' LIMIT 1 + User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."user_id" = 5 LIMIT 1 +Redirected to http://railsgoat.dev/admin/1/dashboard +Completed 302 Found in 27ms (ActiveRecord: 16.7ms) + +Started GET "/admin/1/dashboard" for 127.0.0.1 at 2014-07-10 14:09:11 -0400 +Processing by AdminController#dashboard as HTML + Parameters: {"admin_id"=>"1"} + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 5 LIMIT 1 +  (0.0ms) begin transaction + SQL (0.3ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:09:11 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", "http://railsgoat.dev/?url=%2Fadmin%2F1%2Fdashboard"], ["updated_at", Thu, 10 Jul 2014 18:09:11 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (0.8ms) commit transaction + Rendered admin/dashboard.html.erb within layouts/application (3.8ms) + Rendered layouts/shared/_header.html.erb (1.3ms) + Rendered layouts/shared/_sidebar.html.erb (2.1ms) + Rendered layouts/shared/_messages.html.erb (0.0ms) + Rendered layouts/shared/_footer.html.erb (0.0ms) +Completed 200 OK in 24ms (Views: 20.5ms | ActiveRecord: 1.4ms) + +Started GET "/admin/1/get_all_users" for 127.0.0.1 at 2014-07-10 14:09:12 -0400 +Processing by AdminController#get_all_users as HTML + Parameters: {"admin_id"=>"1"} + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 5 LIMIT 1 +  (0.0ms) begin transaction + SQL (0.3ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:09:12 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", "http://railsgoat.dev/admin/1/dashboard"], ["updated_at", Thu, 10 Jul 2014 18:09:12 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:30.0) Gecko/20100101 Firefox/30.0"]] +  (0.6ms) commit transaction + User Load (0.2ms) SELECT "users".* FROM "users"  + Rendered layouts/admin/_get_all_users.html.erb (1.3ms) +Completed 200 OK in 8ms (Views: 3.5ms | ActiveRecord: 1.4ms) + +Started GET "/" for 127.0.0.1 at 2014-07-10 14:57:33 -0400 +Connecting to database specified by database.yml +Processing by SessionsController#new as HTML +  (0.0ms) begin transaction + SQL (5.2ms) INSERT INTO "analytics" ("created_at", "ip_address", "referrer", "updated_at", "user_agent") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 10 Jul 2014 18:57:33 UTC +00:00], ["ip_address", "127.0.0.1"], ["referrer", nil], ["updated_at", Thu, 10 Jul 2014 18:57:33 UTC +00:00], ["user_agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4"]] +  (0.6ms) commit transaction + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered sessions/new.html.erb within layouts/application (3.1ms) + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."auth_token" = '' LIMIT 1 + CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."user_id" = 0 LIMIT 1 + Rendered layouts/tutorial/_header.html.erb (3.5ms) + Rendered layouts/tutorial/_sidebar.html.erb (6.4ms) + Rendered layouts/shared/_messages.html.erb (0.9ms) + Rendered layouts/shared/_footer.html.erb (0.4ms) +Completed 200 OK in 200ms (Views: 135.0ms | ActiveRecord: 8.8ms)