Reputation: 181
I would like to incorporate company policy into the Rails console so that any customer data being accessed via the console is logged and saved.
Ideally, whenever a developer opens up the console, it should ask him/her for the reason they are doing so along with the customer context if any, and then save any commands run in that session. This log should be stored somewhere and ideally land up in the Inbox of someone who monitors these things.
My question is if such a paradigm exists already on Heroku, and addon, or through a gem, or if not, some direction on how this can be implemented?
Upvotes: 2
Views: 305
Reputation: 32629
Heroku doesn't give you any way to do that automatically.
Consoles are code being executed though. So you could log the start of a bin/console
wherever you want, and ask the person for their reason as the beginning of the session.
As mentioned by spickermann in the comments, people with push access would be able to override that. But Heroku logs all deployments. So if someone tried doing that, you'd know about it too.
Upvotes: 2