expose disable_user_config as Spawner.disable_user_config

This commit is contained in:
Min RK
2016-03-04 14:41:40 +01:00
parent aed29e1db8
commit 7f89f1a2a0
2 changed files with 24 additions and 1 deletions

View File

@@ -140,6 +140,14 @@ class Spawner(LoggingConfigurable):
"""
)
disable_user_config = Bool(False, config=True,
help="""Disable per-user configuration of single-user servers.
This prevents any config in users' $HOME directories
from having an effect on their server.
"""
)
def __init__(self, **kwargs):
super(Spawner, self).__init__(**kwargs)
if self.user.state:
@@ -210,6 +218,8 @@ class Spawner(LoggingConfigurable):
args.append('--notebook-dir=%s' % self.notebook_dir)
if self.debug:
args.append('--debug')
if self.disable_user_config:
args.append('--disable-user-config')
args.extend(self.args)
return args