Added support for multiple admins

Review Request #2670 — Created Oct. 23, 2011 and discarded

hongbin
Review Board
reviewboard
* Admins names and emails can be added and removed through admin UI.
* New User registration emails will send to all admins.

This patch go with another patch in djblet:
http://reviews.reviewboard.org/r/2671/
Unit tested. The result looks good except some failure due to Windows environment.
Manually test:
* Manually added and removed admins in FF, Chrome, and IE. Worked as expected.
* Ran "prepare-dev.py", admins settings was migrated properly.
* Registered a new user, email notifications sent to all admins.

Loading file attachments...

Description From Last Updated

This would just be good as "Name."

chipx86chipx86

"E-mail Address"

chipx86chipx86

"Delete"

chipx86chipx86

"Add" Actually, it'd be nice to have this be somewhat dynamic so that there's always one more row of blank ...

chipx86chipx86

Should derive from object.

chipx86chipx86

Should be initial_data instead of initVals. No CamelCase.

chipx86chipx86

This can instead be: initial_data = [ { 'site_admin_name': admin[0], 'site_admin_email': admin[1], } for admin in admins ]

chipx86chipx86

All one line.

chipx86chipx86

All one line.

chipx86chipx86

Blank line between these. The setting of "admins" should probably be grouped with the save call.

chipx86chipx86

Blank line between the block and apply_setting. Should group the two apply_settings together.

chipx86chipx86

SSHSettingsForm should be indented along with AdminsFormSetManager.

chipx86chipx86

Store site_config separately and pass it in. It'll make for nicer code.

chipx86chipx86

Is this part of this change?

chipx86chipx86

Should be localized.

chipx86chipx86

No space in {{variables}}

chipx86chipx86

the href should be "#". javascript: URLs are deprecated and not even supported in modern browsers. Also, localize the text.

chipx86chipx86

Same comments about href and localization.

chipx86chipx86
chipx86
  1. I'm going to be very happy when this change is in. :) Some style and text stuff first.
  2. This would just be good as "Name."
  3. "E-mail Address"
  4. "Add"
    
    Actually, it'd be nice to have this be somewhat dynamic so that there's always one more row of blank values. That'd remove the need for "Add" and instead there'd just be fields to type into. Much better user experience.
    1. Did that, but the drawback is the delete. User need to delete the target admin as well as the blank form.....
  5. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Should derive from object.
  6. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Should be initial_data instead of initVals. No CamelCase.
  7. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    This can instead be:
    
    initial_data = [
        {
            'site_admin_name': admin[0],
            'site_admin_email': admin[1],
        }
        for admin in admins
    ]
  8. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    All one line.
  9. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    All one line.
  10. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
    Blank line between these.
    
    The setting of "admins" should probably be grouped with the save call.
  11. reviewboard/admin/siteconfig.py (Diff revision 1)
     
     
     
     
     
    Blank line between the block and apply_setting. Should group the two apply_settings together.
  12. reviewboard/admin/views.py (Diff revision 1)
     
     
     
    SSHSettingsForm should be indented along with AdminsFormSetManager.
  13. reviewboard/admin/views.py (Diff revision 1)
     
     
     
    Store site_config separately and pass it in. It'll make for nicer code.
  14. reviewboard/diffviewer/diffutils.py (Diff revision 1)
     
     
    Is this part of this change?
  15. Should be localized.
  16. No space in {{variables}}
  17. the href should be "#".
    
    javascript: URLs are deprecated and not even supported in modern browsers.
    
    Also, localize the text.
  18. Same comments about href and localization.
  19. 
      
HO
HO
Review request changed

Status: Discarded

Loading...