Users get 403 because Lp has contradictory rules to unlink packages

Bug #1033523 reported by Curtis Hovey
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Curtis Hovey

Bug Description

Launchpad's zcml states that anyone can unlink a package from a series. The rule is used on the distrribution and source package pages, and on the project's package pages. When translation message sharing was added, a condition was added to the code that will raise a forbidden error if the user attempts to unlink a package from a series that is sharing translations.

A. When the rule was added, all places that show the remove packaging links should have been updated to use the code rules. so that Lp does not lie to users. I see a nominal attempt to guard the links on the source package's menu, which is seen less often than the DSP's page.

B. I think the code rule is wrong. Packaging.userCanDelete() assumes that unlinking the package will also remove the shared messages accidentally. A common reason a series is unlinked is because a series was linked to several packages, which is wrong. Ubuntu does not loose data in this case. Secondly the permission check assumes that Packaging.owner entitles a group control the package. This is not so. Packaging.owner is the registrant. This check entitles sinzui and jelmer to change packaging because they registered 50% of all packaging links.

If the link is wrong, anyone should be permitted to remove it. I think the restriction exists to prevent accidental loss of translations, and that could be solved by asking the user to confirm the the series with translations must be removed. The confirmation is not needed is the series is linked to several packages. There already is a confirmation page, all that is needed is an explanation that translations are shared, do you still want to remove the packaging link?

Related branches

Curtis Hovey (sinzui)
summary: - Users get 503 because Lp has contradictory rules to unlink packages
+ Users get 403 because Lp has contradictory rules to unlink packages
description: updated
Curtis Hovey (sinzui)
tags: added: regression
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
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.