Unlocks routes "problem" #373

Closed
thibaudgg opened this Issue Jul 9, 2010 · 7 comments

3 participants

@thibaudgg

Unlocks routes should not exist (be added) when config.unlock_strategy is set to :time only.

@josevalim
Plataformatec member

Unfortunately this is not trivial to fix. :( But rest assured that the user cannot access any action, we have this before filter check: http://github.com/plataformatec/devise/blob/master/app/controllers/devise/unlocks_controller.rb#L39

:)

@thibaudgg

But rest assured that the user cannot access any action, we have this before filter check

Yes I have see that, I just hoped there was a way to even not see the routes. Too bad :(

@Titinux

Unlocks routes are also generated with config.unlock_stategy sets to :none.

A temporary solution could be passing :skip => :unlocks to devise_for method in config/routes.rb

@thibaudgg

thx for :skip tip titinux!

@josevalim
Plataformatec member

Do not add unlock routes unless unlock strategy is email or both, closed by 2602ef4

@thibaudgg

Great, thank you!

@Titinux

Thanks a lot.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment