I've got installed gems mongodb_logger
and devise
.
I was wondering how to restrict access to users who are registered in devise
?
I tried as follows( restricting to users with admin
role)
authenticate :user, ->(u) { u.admin? } do
mount MongodbLogger::Server.new, at: "/mongodb_logger", as: :mongodb_logger,
in my routes.rb. But this didn't help... How can I do such a thing ?
Aucun commentaire:
Enregistrer un commentaire