This commit is a rough port to Django 2.1, Python 3 and a Docker based local
development setup. Tests fail/error but migrations and the web frontend are
already runnable. Task queue functionality is untested and translations seem to
have trouble.
This commit adds tests for more corner cases of
SshPublicKeyManager.parse_keytext to raise the test coverage to 100%.
The method now handles invalid keys more thoroughly.
This commit raises the test coverage for osusers.admin to 100% by adding
tests for UserAdmin, GroupAdmin, SshPublicKeyCreationForm and
SshPublicKeyAdmin. The commit adds a refactoring TODO to
SshPublicKeyAdmin.perform_delete_selected because the asynchronous
background task should be launched from a signal handler.
This commit fixes all warnings created by flake8 by removing unused
imports and variable assignments. Some wrongly indented lines are now
indented correctly.
- don't execute celery tasks directly
- introduce optional parameters to fileserver tasks to allow chaining
- handle user/group/key create and delete tasks in new osusers.signals
class
- adapt unit tests
- change TaskResults model to store the task signatures
- generalize the local settings' logging configuration
- make sure that AddSshPublicKeyForm does not try to parse the key if it is
None
- split the key text into a maximum of 3 parts to allow whitespace in comments
- update changelog
- add sshkeys to hostingpackage detail view context
- implement new osusers.forms.EditSshPublicKeyCommentForm
- implement new views ListSshPublicKeys, DeleteSshPublicKey and
EditSshPublicKeyComment
- add new URL patterns 'list_ssh_keys', 'edit_ssh_key_comment' and
'delete_ssh_key'
- link from hosting package detail view to 'list_ssh_keys' when there are
SSH keys assigned to the shown hosting package
- add new templates osusers/sshpublickey_list.html,
osusers/sshpublickey_confirm_delete.html and
osusers/sshpublickey_edit_comment
- add operating system user output to template
osusers/sshpublickey_create.html
- add changelog entry
- implement new form osusers.forms.AddSshPublicKeyForm
- move message texts from osusers.admin to osusers.forms
- add new view osusers.views.AddSshPublicKey
- add new URL patter 'add_ssh_key' to osusers.urls
- add new template osusers/sshpublickey_create.html
- link from hosting package detail template to 'add_ssh_key'
- add changelog entry for new feature
- implement custom perform_delete_selected action for SshPublicKeyAdmin that
ensures that the authorized_keys files of all affected users are rebuilt
after deleting keys
- implement custom get_actions to replace the default delete_selected action
with the custom perform_delete_selected
- define get_readonly_fields to make sure that the key algorithm and data
cannot be changed
- implement save and delete methods in osusers.models.SshPublicKey that trigger
set_file_ssh_authorized_keys
- add new test methods to osusers.tests.test_models.SshPublicKeyTest
- implement osusers.models.SshPublicKey and osusers.models.SshPublicKeyManager
- fix broken osusers.models.tests.test_models
- add new test classes SshPublicKeyManagerTest and SshPublicKeyTest
- add migration for SshPublicKey model
- document new feature in changelog
- add autogenerated documentation for osusers.urls and osusers.views
- add osuser URLs to gnuviechadmin.urls
- implement get_absolute_url in hostingpackages.models.CustomerHostingPackage
- use set_ldap_user_password instead of create_ldap_user for existing OS users
in osusers.models.User.set_password
- add URL pattern set_osuser_password in osusers.urls
- implement osusers.views.SetOsUserPassword to set the password of an existing
operating system user
- link to hosting package detail view on user dashboard
- add template hostingpackages/customerhostingpackage_detail.html
- add template osusers/user_setpassword.html
- use new file tasks to create SFTP and mail base directories for users
- use json serializer as default
- remove TaskResult classes that don't provide any significant benefit
- remove TaskResultInline and subclasses
- add custom perform_delete_selected action to UserAdmin and GroupAdmin
- properly clean asynchronous tasks in rabbitmq
- wrap user operations in transactions