#6714 Rename & move User.project_role()

asf_release_1.1.0
closed
Cory Johns
General
2013-11-04
2013-09-27
Dave Brondsema
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. :-)

     
    • QA: 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

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

     
    • status: code-review --> closed