Missing link to private PPA on project team's page

Bug #458200 reported by Chih-Hsyuan Ho
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Nelson

Bug Description

There is no direct link in project team's page to its PPA (which is private, by the way.) For example:
A project team's PPA is located in: https://launchpad.net/~launch-lite/+archive/ppa/ , no direct link to it can be found in the project team's page: https://launchpad.net/~launch-lite

Tags: lp-soyuz

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

The PPA portlet does appear for normal PPA, It does not for P3As. I assume that since I can see the P3A page, I should also see the portlet

summary: - Can't link to the PPA directly through its project team's page
+ Missing link to private PPA on project team's page
affects: launchpad → soyuz
Changed in soyuz:
importance: Undecided → High
status: New → Triaged
summary: - Missing link to private PPA on project team's page
+ Missing link to private P3A on project team's page
Revision history for this message
Karl Fogel (kfogel) wrote : Re: Missing link to private P3A on project team's page

Proposed behavior sounds reasonable to me. If you can see X, you should be able to see links to X.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I have another team with a PPA and it all works perfectly fine for me. Would it be possible to make me a member of launch-lite temporarily so I can verify this with your PPA?

summary: - Missing link to private P3A on project team's page
+ Missing link to private PPA on project team's page
Changed in soyuz:
status: Triaged → Incomplete
Revision history for this message
Julian Edwards (julian-edwards) wrote :

I meant another team with a private PPA of course!

Revision history for this message
Chih-Hsyuan Ho (chih) wrote :

Bill, I was filing a Launchpad bug using launch-lite team as an example. Would you please grant julian-edwards (in Launchpad Soyuz team) access to the team so that the issue can be looked into more closely? Thank you.

Revision history for this message
Bill Filler (bfiller) wrote :

julian-edwards has been added as member to launch-lite team

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Thanks, I see the bug now. Very odd.

Changed in soyuz:
status: Incomplete → Triaged
Revision history for this message
Michael Nelson (michael.nelson) wrote :

The current logic used on the person view - and inherited for the team view is (from IPersonView.should_show_ppa_section):

display the ppa portlet if:
  1. The current user has edit permission on the person/team (ie. to enable ppa activation), or
  2. The person/team has at least one public ppa

This logic makes sense for person, but not for a team where members do *not* necessarily have edit permission for the team - and the team does not have a public PPA.

So the fix should be as simple as moving the (1) condition above to the actual ppa activate link within the portlet, and simplifying the above logic to:

display the ppa portlet if:
  1. The current user has permission to view any of the PPAs.

Changed in soyuz:
status: Triaged → In Progress
Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: [Bug 458200] Re: Missing link to private PPA on project team's page

On Wed, 2009-10-28 at 10:21 +0000, Michael Nelson wrote:
> The current logic used on the person view - and inherited for the team
> view is (from IPersonView.should_show_ppa_section):
>
> display the ppa portlet if:
> 1. The current user has edit permission on the person/team (ie. to enable ppa activation), or
> 2. The person/team has at least one public ppa
>
> This logic makes sense for person, but not for a team where members do
> *not* necessarily have edit permission for the team - and the team does
> not have a public PPA.
>
> So the fix should be as simple as moving the (1) condition above to the
> actual ppa activate link within the portlet, and simplifying the above
> logic to:
>
> display the ppa portlet if:
>
> 1. The current user has permission to view any of the PPAs.
>

erm, that should have been, display the ppa portlet if:

1. The current user has edit permission on the person/team (ie. to
enable ppa activation), or
2. The current user has permission to view any of the PPAs.

(ie. only 2 needs to change - we still need 1 there to ensure that the
section is displayed for editors to activate a new PPA).

Changed in soyuz:
assignee: nobody → Muharem Hrnjadovic (al-maisan)
Changed in soyuz:
assignee: Muharem Hrnjadovic (al-maisan) → Michael Nelson (michael.nelson)
milestone: none → 3.1.10
Changed in soyuz:
milestone: 3.1.10 → none
Changed in soyuz:
milestone: none → 3.1.11
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I had this ready to land, but there was a legit test failure which needs input (it's really a registry bug, at least, the changes in the above MP were all in browser/person.py etc., Muharem and I just continued on it as it was a good pairing bug).

The fix that I did in the above branch is: "Instead of showing the section when there is at least one public ppa, we show the section when there is at least one ppa that the current user can view.", but clearly, this affects the test below, as a disabled PPA is not viewable (but is public).

From lp/registry/browser/tests/person-views.txt
{{{
If we disable Cprov's PPA, the section is still presented to anyone.

    >>> login("<email address hidden>")
    >>> cprov.archive.enabled = False

    >>> login(ANONYMOUS)
    >>> view = create_initialized_view(cprov, "+index")
    >>> view.should_show_ppa_section
    True
}}}

If Curtis/registry is happy for the above behavior to change, I'll update the branch and land it.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Or alternatively, update the behaviour of the branch to:

"Instead of showing the section when there is at least one public ppa, we show the section when there is at least one public ppa *or* a ppa that the current user can view."

Let me know what you'd prefer Curtis (I assume this latter option, as it won't change the behaviour - unfortunately I didn't get as far as that in 3.1.10 as I was asked to do the release manager role at the last minute).

Revision history for this message
Curtis Hovey (sinzui) wrote :

On Fri, 2009-11-20 at 11:07 +0000, Michael Nelson wrote:
> I had this ready to land, but there was a legit test failure which needs
> input (it's really a registry bug, at least, the changes in the above MP
> were all in browser/person.py etc., Muharem and I just continued on it
> as it was a good pairing bug).
>
> The fix that I did in the above branch is: "Instead of showing the
> section when there is at least one public ppa, we show the section when
> there is at least one ppa that the current user can view.", but clearly,
> this affects the test below, as a disabled PPA is not viewable (but is
> public).

+1

--
__Curtis C. Hovey_________
http://launchpad.net/

Revision history for this message
Michael Nelson (michael.nelson) wrote :

r 9923 devel.

Changed in soyuz:
status: In Progress → Fix Committed
Changed in soyuz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.