cli: skip auth plugin search/registry in case of cli invocation for faster execution of those actions.
- we don't need to load plugins for CLI calls
This commit is contained in:
parent
0d8040e6fa
commit
6847122bc5
1 changed files with 6 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
# RhodeCode Enterprise Edition, including its added features, Support services,
|
||||
# and proprietary license terms, please see https://rhodecode.com/licenses/
|
||||
|
||||
import os
|
||||
import logging
|
||||
import importlib
|
||||
|
||||
|
|
@ -120,6 +121,11 @@ def includeme(config):
|
|||
route_name='auth_home',
|
||||
context=AuthnRootResource)
|
||||
|
||||
for key in ['RC_CMD_SETUP_RC', 'RC_CMD_UPGRADE_DB', 'RC_CMD_SSH_WRAPPER']:
|
||||
if os.environ.get(key):
|
||||
# skip this heavy step below on certain CLI commands
|
||||
return
|
||||
|
||||
# Auto discover authentication plugins and include their configuration.
|
||||
_discover_plugins(config)
|
||||
_discover_legacy_plugins(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue