mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
monkeysphere: Fix handling of multiple domains and keys
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
722fa39c2a
commit
49640fdfce
2 files changed
+6
-6
No files matched your search
@@ -50,13 +50,12 @@ def index(request):
|
||||
@require_POST
|
||||
def import_key(request, ssh_fingerprint):
|
||||
"""Import a key into monkeysphere."""
|
||||
available_domains = [
|
||||
domain for domains in names.domains.values() for domain in domains
|
||||
]
|
||||
keys = get_keys()
|
||||
available_domains = keys[ssh_fingerprint]['available_domains']
|
||||
try:
|
||||
actions.superuser_run(
|
||||
'monkeysphere',
|
||||
['host-import-key', ssh_fingerprint] + available_domains)
|
||||
['host-import-key', ssh_fingerprint] + list(available_domains))
|
||||
messages.success(request, _('Imported key.'))
|
||||
except actions.ActionError as exception:
|
||||
messages.error(request, str(exception))
|
||||
|
||||
Reference in new issue
Block a user