mardi 21 juin 2016

Locking a user manually for devise rails

As a de facto standard we all using devise for login in Rails application and will use lockable module to lock user after a particular failed attempt.

from the devise source code and config.maximum_attempts = 20 I came to know that, devise perform locking when user try to give wrong login credential.

since config are statically defined at rails application boot time in initializer, My expectation is to set the maximum_attempts dynamically, is it possible? if so guide me..

I have a superadmin and user below each admin, based on the super admin I would like to set different failed_attempt value for each user during the runtime.

Aucun commentaire:

Enregistrer un commentaire