Added support for multiple admins

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

Information

Review Board

Reviewers

* 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.

Screenshots


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. Show all issues
    This would just be good as "Name."
  3. Show all issues
    "E-mail Address"
  4. Show all issues
    "Delete"
  5. Show all issues
    "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.....
  6. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues
    Should derive from object.
  7. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues
    Should be initial_data instead of initVals. No CamelCase.
  8. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    Show all issues
    This can instead be:
    
    initial_data = [
        {
            'site_admin_name': admin[0],
            'site_admin_email': admin[1],
        }
        for admin in admins
    ]
  9. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    Show all issues
    All one line.
  10. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
    Show all issues
    All one line.
  11. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
    Show all issues
    Blank line between these.
    
    The setting of "admins" should probably be grouped with the save call.
  12. reviewboard/admin/siteconfig.py (Diff revision 1)
     
     
     
     
     
    Show all issues
    Blank line between the block and apply_setting. Should group the two apply_settings together.
  13. reviewboard/admin/views.py (Diff revision 1)
     
     
     
    Show all issues
    SSHSettingsForm should be indented along with AdminsFormSetManager.
  14. reviewboard/admin/views.py (Diff revision 1)
     
     
     
    Show all issues
    Store site_config separately and pass it in. It'll make for nicer code.
  15. reviewboard/diffviewer/diffutils.py (Diff revision 1)
     
     
    Show all issues
    Is this part of this change?
  16. Show all issues
    Should be localized.
  17. Show all issues
    No space in {{variables}}
  18. Show all issues
    the href should be "#".
    
    javascript: URLs are deprecated and not even supported in modern browsers.
    
    Also, localize the text.
  19. Show all issues
    Same comments about href and localization.
  20. 
      
HO
HO
Review request changed

Status: Discarded

Loading...