#7679 project.admins() should not include disabled users


Currently disabled users are included in project.admins() method but they shouldn't be. This shows up in the project details above the nav bar, and in the DOAP output.

Perhaps the change should happen in users_with_role so that all those calls have disabled users filtered out too. Need to check all the users_with_role calls to make sure that makes sense.


  • Dave Brondsema

    Dave Brondsema - 2014-09-22
    • Size: --> 2
  • Dave Brondsema

    Dave Brondsema - 2014-09-22
    • Milestone: forge-oct-3 --> forge-oct-17
  • Igor Bondarenko - 2014-10-07
    • Owner: Anonymous --> Igor Bondarenko
    • Labels: --> 42cc
    • Status: open --> in-progress
  • Igor Bondarenko - 2014-10-08

    Closed #668. je/42cc_7679

    I made change in Project.users_with_role. It is used only in:

    • members & admins wiki macro
    • spam check for discussions (to skip check for admins and devs)
    • doap and rest API endpoints
    • inside Project.admins

    For all of this it makes sense to filter out disabled users, I think.

    It is also used in forge-classic to get list of users for a releasers page (e.g. /p/project1/admin/files/releasers/). I assume it's ok to filter out disabled users there too, since they will not be able to do anything with releases anyway. But I'm not 100% sure about this, so you may wanna recheck.

    118:                         self.project.users_with_role('Admin', 'Developer'))]

    Also, I've checked all extensions maintained by us, that listed here https://forge-allura.apache.org/p/allura/wiki/Extensions/. There are no uses of users_with_role in any of them.

    Perhaps, you may want to check sfpy also

  • Igor Bondarenko - 2014-10-08
    • status: in-progress --> code-review
  • Dave Brondsema

    Dave Brondsema - 2014-10-08
    • status: code-review --> closed
    • QA: Dave Brondsema
  • Dave Brondsema

    Dave Brondsema - 2015-01-05
    • Milestone: unreleased --> asf_release_1.2.0

Log in to post a comment.