From b0370680fd4beee9913a432a93eaee0e87003458 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Tue, 4 Jun 2013 16:57:05 +0200 Subject: [PATCH] Added user delete setting to YubiAuth. --- yubiadmin/apps/auth.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/yubiadmin/apps/auth.py b/yubiadmin/apps/auth.py index a68ed63..81b8c34 100644 --- a/yubiadmin/apps/auth.py +++ b/yubiadmin/apps/auth.py @@ -71,7 +71,9 @@ auth_config = FileConfig( ('hsm_device', python_handler('YHSM_DEVICE', 'yhsm://localhost:5348')), ('db_config', python_handler('DATABASE_CONFIGURATION', 'sqlite:///:memory:')), - ('user_registration', python_handler('ENABLE_USER_REGISTRATION', True)) + ('user_registration', python_handler('ENABLE_USER_REGISTRATION', + True)), + ('user_deletion', python_handler('ALLOW_USER_DELETE', False)), ] ) @@ -109,6 +111,13 @@ class SecurityForm(ConfigForm): Allow users to register themselves using the YubiAuth client interface. """ ) + user_deletion = BooleanField( + 'Enable User Deletion', + description=""" + Allow users to delete their own account using the YubiAuth client + interface. + """ + ) security_level = SelectField( 'Security Level', coerce=int,