igorkasyanchuk / rails_db

Rails Database Viewer and SQL Query Runner
https://www.railsjazz.com/
MIT License
1.46k stars 111 forks source link

how can i disable automatic mounting to rails routes? #4

Closed mkhairi closed 8 years ago

mkhairi commented 8 years ago

i want manually mount rails_db engine to specific routes.

authenticated :user, lambda {|u| u.super_user? }  do
     mount RailsDb::Engine => "/rails/db", as: 'rails_db'
end
igorkasyanchuk commented 8 years ago

I'll investigate this case, maybe some configuration will be added But what I plan to do in near few days is to add HTTP_BASIC auth to access Rails DB console. So you can access it with some login/password

mkhairi commented 8 years ago

okay, nice! :+1:

igorkasyanchuk commented 8 years ago

Added (see doc)

enabled - enable of disable gem (by default this gem is enabled only in development mode). http_basic_authentication_enabled - Enable HTTP_BASIC authentication. http_basic_authentication_user_name - HTTP_BASIC authentication user name. http_basic_authentication_password - HTTP_BASIC authentication password.

in latest version

mkhairi commented 8 years ago

:+1: for authentication! but, i think it still need option be able on/off automatic mounting route. in some cases there are people use constraints rule in routes. :)

igorkasyanchuk commented 8 years ago

New version of Rails DB gem is available 0.4.

Changes:

Please don't forget to share link with your friends. I need to have more feedback. Thanks

igorkasyanchuk commented 8 years ago

Please check now version 0.5.1, it has one more option - verify_access_proc, maybe it will help you too