sinatra-accept-params icon indicating copy to clipboard operation
sinatra-accept-params copied to clipboard

How to set login_required flag?

Open andrewcrook opened this issue 14 years ago • 4 comments

Dont need to be logged in, but cant work out how to set flag to disable login checking. Any ideas?

andrewcrook avatar Jun 22 '11 13:06 andrewcrook

Hi Nate,

:login is missing from the @settings hash.

Should SSL and login really be required by default?

Thank you for the nice gem!

jamiehodge avatar Jul 12 '11 11:07 jamiehodge

Jamie, sorry if I'm being dense - can you be a bit more specific? Thanks

nateware avatar Jul 14 '11 22:07 nateware

it checks for :login by default there is no login config method to set the :login key in the @settings hash to override this behaviour (I think there is for SSL its ssl_enabled), for example AcceptParams.login_checking_enabled (sets @settings[:login])

/ lib / sinatra / accept_params / param_rules.rb line 68

if @settings[:login] << how to set to true/false?

andrewcrook avatar Sep 01 '11 13:09 andrewcrook

Ahh, I get it now... if someone can spin a patch I'll pull it in - thanks!

nateware avatar Nov 21 '11 19:11 nateware