Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unlocks routes "problem" #373

Closed
thibaudgg opened this Issue · 7 comments

3 participants

Thibaud Guillaume-Gentil José Valim Jérémie Horhant
Thibaud Guillaume-Gentil

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

José Valim
Owner

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

:)

Thibaud Guillaume-Gentil

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 :(

Jérémie Horhant

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

Thibaud Guillaume-Gentil

thx for :skip tip titinux!

José Valim
Owner

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

Thibaud Guillaume-Gentil

Great, thank you!

Jérémie Horhant

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
Something went wrong with that request. Please try again.