← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~sinzui/launchpad/administer-team into lp:launchpad

 

Add the administer link to the team page.

    Launchpad bug: https://bugs.launchpad.net/bugs/669658
    Pre-implementation: no one

While helping with a question , I realised I could not administer the
team. I could hack the URL with +review to change the team name, but the
link was not shown on the page.

--------------------------------------------------------------------

RULES

    * Add the administer link to the team page.
    * ADDENDUM: It is clear now that the link was omitted from the
      page because launchpad.Moderate is given to team owners and admins,
      as well as Lp admins and registry experts.
      * The link enabled rules need to be very clear about the roles
        being checked.


QA

    * Visit qastaging.launchpad.net/~launchpad
    * Verify there is an Administer link before the delete action.


LINT

    lib/lp/registry/browser/team.py
    lib/lp/registry/browser/tests/test_team.py
    lib/lp/testing/menu.py


TEST

    ./bin/test -vv -t Menu lp.registry.browser.tests.test_team


IMPLEMENTATION

Added an Administer link to the Team index page. I discovered that team
owners and registry experts saw the same links, then realised that they
both have launchpad.Moderate on a team. While is is harmless for team
owners and admins to see the link and use the page, we want them to
use +edit so I choose to use a checker that checks the roles we know
should have access to +review.
    lib/lp/registry/browser/team.py
    lib/lp/registry/browser/tests/test_team.py

I discovered that the bad link message was not always returned when the
context object was the reason there was no canonical URL. This fix will
help anyone else debugging specific links menus in the future.
    lib/lp/testing/menu.py
-- 
https://code.launchpad.net/~sinzui/launchpad/administer-team/+merge/90530
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/administer-team into lp:launchpad.


References