Closed chabgood closed 5 years ago
This is just an example. Do you use any authentication library like devise? You can add to own logic to block access to rails db.
We do not use devise.
So just change logic in this block. Inside you have access to controller and could call your own verification methods
since this is loaded up when rails starts how can i put in logic to see who the user is?
I can do current_user from a controller, this is still giving me the same error. Is there a way to mix in current_user at a different time so it works?
What is your config/initializers/rails_db.rb? Paste it
Rails 5, getting:
undefined method
current_user' for #when I do
config.verify_access_proc = proc { |controller| controller.current_user.system_admin? }`