sshUser mit und ohne @
This commit is contained in:
parent
544a26c54a
commit
3d479977f0
1 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,11 @@ def serve_principal(sshUser, principals):
|
||||||
TEMPLATE=('command="gitosis-serve %(user)s",no-port-forwarding,'
|
TEMPLATE=('command="gitosis-serve %(user)s",no-port-forwarding,'
|
||||||
+'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s')
|
+'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s')
|
||||||
|
|
||||||
print TEMPLATE % dict(user=sshUser, principals=principals)
|
if '@' in sshUser:
|
||||||
|
for user in [ sshUser, sshUser.split('@')[0] ]
|
||||||
|
print TEMPLATE % dict(user=user, principals=principals)
|
||||||
|
else:
|
||||||
|
print TEMPLATE % dict(user=sshUser, principals=principals)
|
||||||
|
|
||||||
|
|
||||||
class Main(app.App):
|
class Main(app.App):
|
||||||
|
|
Loading…
Reference in a new issue