#6714 Rename & move User.project_role()

v1.1.0
closed
General
2015-08-20
2013-09-27
No

The User.project_role method creates roles, which may not be what you want (and may cause a large number of roles to be added to mongo). Rename it to something that makes its "upsert" functionality clear.

Also move it to the ProjectRole class, as that is more closely related to its functionality.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-10-04
    • Milestone: forge-oct-18 --> forge-nov-01
     
  • Dave Brondsema

    Dave Brondsema - 2013-10-21
    • Size: --> 1
     
  • Cory Johns

    Cory Johns - 2013-10-23
    • status: open --> in-progress
    • assigned_to: Cory Johns
     
  • Cory Johns

    Cory Johns - 2013-10-23
    • status: in-progress --> code-review
     
  • Cory Johns

    Cory Johns - 2013-10-23

    allura:cj/6714

     
  • Cory Johns

    Cory Johns - 2013-10-24
    • status: code-review --> in-progress
     
  • Cory Johns

    Cory Johns - 2013-10-24
    • status: in-progress --> code-review
     
  • Cory Johns

    Cory Johns - 2013-10-24

    allura:cj/6714
    forge-classic:cj/6714

     
  • Dave Brondsema

    Dave Brondsema - 2013-10-25

    Note: ProjectRole.by_user was already in use in one place: Allura/allura/lib/security.py:all_allowed

     
  • Cory Johns

    Cory Johns - 2013-10-28

    Yeah, I guess I should have mentioned that, but that was a new addition specifically to avoid the upsert behavior of User.project_role() so I figured it was practically part of this ticket. :-)

     
  • Tim Van Steenburgh

    • QA: Tim Van Steenburgh
     
  • Tim Van Steenburgh

    • status: code-review --> in-progress
     
  • Cory Johns

    Cory Johns - 2013-10-31
    • status: in-progress --> code-review
     
  • Cory Johns

    Cory Johns - 2013-10-31

    Rebase and test fixes force-pushed to:
    allura:cj/6714

     
  • Tim Van Steenburgh

    This is gtg but would like to hold for a separate push.

     
  • Tim Van Steenburgh

    • status: code-review --> closed
     

Log in to post a comment.