##// END OF EJS Templates
narrow: fix for getting the username when running http server...
idlsoft -
r36180:4224f26c default
parent child Browse files
Show More
@@ -327,13 +327,14 b' def getbundlechangegrouppart_narrow(bund'
327 part.addparam('treemanifest', '1')
327 part.addparam('treemanifest', '1')
328
328
329 def applyacl_narrow(repo, kwargs):
329 def applyacl_narrow(repo, kwargs):
330 username = repo.ui.shortuser(repo.ui.username())
330 ui = repo.ui
331 user_includes = repo.ui.configlist(
331 username = ui.shortuser(ui.environ.get('REMOTE_USER') or ui.username())
332 user_includes = ui.configlist(
332 _NARROWACL_SECTION, username + '.includes',
333 _NARROWACL_SECTION, username + '.includes',
333 repo.ui.configlist(_NARROWACL_SECTION, 'default.includes'))
334 ui.configlist(_NARROWACL_SECTION, 'default.includes'))
334 user_excludes = repo.ui.configlist(
335 user_excludes = ui.configlist(
335 _NARROWACL_SECTION, username + '.excludes',
336 _NARROWACL_SECTION, username + '.excludes',
336 repo.ui.configlist(_NARROWACL_SECTION, 'default.excludes'))
337 ui.configlist(_NARROWACL_SECTION, 'default.excludes'))
337 if not user_includes:
338 if not user_includes:
338 raise error.Abort(_("{} configuration for user {} is empty")
339 raise error.Abort(_("{} configuration for user {} is empty")
339 .format(_NARROWACL_SECTION, username))
340 .format(_NARROWACL_SECTION, username))
General Comments 0
You need to be logged in to leave comments. Login now