diff --git a/docs/changelog.rst b/docs/changelog.rst index 04facd8..c9d22bd 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,8 @@ Changelog ========= +* :support:`-` add API for gvafile task set_file_ssh_authorized_keys (requires + gvafile >= 0.5.0 on the fileserver side) * :support:`-` update to Django 1.7.4 * :release:`0.9.0 <2015-01-27>` diff --git a/gnuviechadmin/fileservertasks/tasks.py b/gnuviechadmin/fileservertasks/tasks.py index 388c79a..c04d395 100644 --- a/gnuviechadmin/fileservertasks/tasks.py +++ b/gnuviechadmin/fileservertasks/tasks.py @@ -118,3 +118,18 @@ def delete_file_website_hierarchy(username, sitename): :rtype: str """ + + +@shared_task +def set_file_ssh_authorized_keys(username, ssh_keys): + """ + This task sets the authorized keys for ssh logins. + + :param str username: the user name + :param list ssh_key: an ssh_key + :raises Exception: if the update of the creation or update of ssh + authorized_keys failed + :return: the name of the authorized_keys file + :rtype: str + + """