Show More
@@ -32,6 +32,8 b' import logging' | |||||
32 | import click |
|
32 | import click | |
33 |
|
33 | |||
34 | from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults |
|
34 | from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults | |
|
35 | from rhodecode.lib.request import Request | |||
|
36 | from rhodecode.lib.utils2 import AttributeDict | |||
35 | from rhodecode.lib.statsd_client import StatsdClient |
|
37 | from rhodecode.lib.statsd_client import StatsdClient | |
36 | from rhodecode.lib.config_utils import get_app_config_lightweight |
|
38 | from rhodecode.lib.config_utils import get_app_config_lightweight | |
37 |
|
39 | |||
@@ -74,7 +76,11 b' def main(ini_path, mode, user, user_id, ' | |||||
74 |
|
76 | |||
75 | try: |
|
77 | try: | |
76 | connection_info = os.environ.get('SSH_CONNECTION', '') |
|
78 | connection_info = os.environ.get('SSH_CONNECTION', '') | |
77 | env = {'RC_CMD_SSH_WRAPPER': '1'} |
|
79 | request = Request.blank('/', base_url=settings['app.base_url']) | |
|
80 | request.user = AttributeDict({'username': user, | |||
|
81 | 'user_id': user_id, | |||
|
82 | 'ip_addr': connection_info.split(' ')[0] if connection_info else None}) | |||
|
83 | env = {'RC_CMD_SSH_WRAPPER': '1', 'request': request} | |||
78 | ssh_wrapper = SshWrapperStandalone( |
|
84 | ssh_wrapper = SshWrapperStandalone( | |
79 | command, connection_info, mode, |
|
85 | command, connection_info, mode, | |
80 | user, user_id, key_id, shell, ini_path, settings, env) |
|
86 | user, user_id, key_id, shell, ini_path, settings, env) |
General Comments 0
You need to be logged in to leave comments.
Login now