• 
      

    Allow users to add or remove themselves to/from groups using the API.

    Review Request #5298 — Created Jan. 22, 2014 and submitted

    Information

    Review Board
    master

    Reviewers

    Allow users to add or remove themselves to/from groups using the API.

    Previously, there was no way for a user to add themselves to a group, or
    remove themselves from a group. Only admins were able to do this. There
    was also a bad query preventing adding on non-localsites.

    Now a user can add themselves to any group they'd have access to, and
    remove themselves from any group they're on. This works with both global
    groups and groups on Local Sites.

    Unit tests pass.

    Added myself to a global group as a non-admin, and removed myself from
    the same group.

    Description From Last Updated

    A lot of this code would be more readable if you assigned resources.review_group to a local variable.

    david david

    This is duplicated almost exactly between here and create(). Can you extract it?

    david david
    david
    1. 
        
    2. Show all issues

      A lot of this code would be more readable if you assigned resources.review_group to a local variable.

    3. reviewboard/webapi/resources/review_group_user.py (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      This is duplicated almost exactly between here and create(). Can you extract it?

    4. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    chipx86
    chipx86
    david
    1. Even better.

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed