Open Bandes opened 3 years ago
Yes, i'm confused with this too, and now after setup trestle-auth the devise user did not login anymore!
Same here. How would I limit access to Trestle to admins only? I also use Devise.
In my case it was simply setting a before_action in config/initializers/trestle.rb
config.before_action do |_controller|
unless current_user.admin?
redirect_to '/'
end
end
Hi - I am confused by how trestle-auth works, I have a User model in Devise which has an
admin
boolean on it. I would like to limit access to all of Trestle to only users withadmin == true
- it seems like that might be whattrestle-auth
is for, but I can't figure out how to get it set up.Does it have something to do with this