Define Heroku user account in Rails console

Is it possible to identify the heroku username of the current user connected to the application through the running console?

So say I'm connecting to the rails console in my heroku application using

heroku run rails c --app my-app

I would like to be able to run the command and print it:

heroku.user@example.com

Where heroku.user@example.com is the email address / username of the user connected to the console.

I tried a couple of basic Linux commands, for example

`whoami`

but you will get a common username e.g. u12345

, , , , (CLI, - ..).

+7
1

, . , heroku, , .

2019-04-12T15:48:05.727693+00:00 app[api]: Starting process with command 'rails console' by user me@mycompany.org

0

Source: https://habr.com/ru/post/1687945/


All Articles