This repository was archived by the owner on Dec 12, 2021. It is now read-only.
-
Couldn't load subscription status.
- Fork 780
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
Role Infinite loop #1039
Copy link
Copy link
Open
Description
when i have a user that doesn't have a role, it has a Infinite loop and not redirecting to the login page
my rescue_from
rescue_from CanCan::AccessDenied do |exception|
if user_signed_in?
flash[:error] = "Not authorized to view this page"
session[:user_return_to] = nil
redirect_to root_url
else
flash[:error] = "You must first login to view this page"
session[:user_return_to] = request.url
redirect_to "/users/sign_in"
end
end
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:05 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:06 -0400
Processing by CustomersController#index as HTML
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 6ms (ActiveRecord: 0.3ms)
Started GET "/" for ::1 at 2016-03-31 08:57:06 -0400
Processing by CustomersController#index as HTML
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Redirected to http://localhost:3000/
Completed 302 Found in 7ms (ActiveRecord: 0.4ms)
Metadata
Metadata
Assignees
Labels
No labels