Add support for disabling user registration.

Review Request #760 — Created March 13, 2009 and submitted

Information

Review Board SVN (deprecated)
trunk

Reviewers

Add support for disabling user registration.

This provides a checkbox in the General Settings page for disabling user
registration. This only takes effect when using standard authentication,
and will hide the "Register" link and redirect requests made to
/account/register/ to the /account/login/ page instead.
Tested the /account/register/ path and the existence of the link with the following combinations:

* Registration enabled and standard auth
* Registration disabled and standard auth
* Registration enabled and LDAP
* Registration disabled and LDAP

All cases work. Note that LDAP is a good enough test for non-standard auth types, since the only auth-specific checks are against "builtin".
david
  1. 
      
  2. /trunk/reviewboard/admin/forms.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
    If this only affects builtin auth, shouldn't this be part of an auth_builtin fieldset? That way it would appear/disappear based on what authentication backend you select.
    1. Originally I had made it part of the built-in auth only, but there's no reason it should be specific to built-in auth. For example, OpenID may need a register page. I don't want to limit it and make it specific to built-in auth for this reason.
    2. I suppose. I'm tempted to say let's make it builtin only for now and we can generalize later when multiple backends want to do it.
    3. Alright, we can do that. I suppose as long as we keep the settings name generic, it's fine.
  3. And you could get rid of this special case.
  4. 
      
chipx86
Review request changed
david
  1. Looks good!
  2.