diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-12 21:10:52 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-08-12 21:10:52 -0400 |
commit | 3759b85789d258ead2b09ff1653203e76166cd1c (patch) | |
tree | 21a17525e0c0a7e39fe415b4c8c04e302f7485a3 /askbot/conf | |
parent | ca2c6aa73f31ba1adb5dd62a416807773fb369f3 (diff) | |
download | askbot-3759b85789d258ead2b09ff1653203e76166cd1c.tar.gz askbot-3759b85789d258ead2b09ff1653203e76166cd1c.tar.bz2 askbot-3759b85789d258ead2b09ff1653203e76166cd1c.zip |
Added options to restrict email addresses and requirement to validate an email before joining the site
Diffstat (limited to 'askbot/conf')
-rw-r--r-- | askbot/conf/access_control.py | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/askbot/conf/access_control.py b/askbot/conf/access_control.py index cd2364b5..5da88936 100644 --- a/askbot/conf/access_control.py +++ b/askbot/conf/access_control.py @@ -13,9 +13,45 @@ settings.register( livesettings.BooleanValue( ACCESS_CONTROL, 'ASKBOT_CLOSED_FORUM_MODE', - default = False, + default=False, description=_('Allow only registered user to access the forum'), ) ) +EMAIL_VALIDATION_CASE_CHOICES = ( + ('nothing', _('nothing - not required')), + ('see-content', _('access to content')), + #'post-content', _('posting content'), +) + +settings.register( + livesettings.StringValue( + ACCESS_CONTROL, + 'REQUIRE_VALID_EMAIL_FOR', + default='nothing', + choices=EMAIL_VALIDATION_CASE_CHOICES, + description=_( + 'Require valid email for' + ) + ) +) +settings.register( + livesettings.LongStringValue( + ACCESS_CONTROL, + 'ALLOWED_EMAILS', + default='', + description=_('Allowed email addresses'), + help_text=_('Please use space to separate the entries') + ) +) + +settings.register( + livesettings.LongStringValue( + ACCESS_CONTROL, + 'ALLOWED_EMAIL_DOMAINS', + default='', + description=_('Allowed email domain names'), + help_text=_('Please use space to separate the entries, do not use the @ symbol!') + ) +) |