AttributeError on potemplate page

Bug #507498 reported by Diogo Matsubara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Adi Roiban

Bug Description

As seen on OOPS-1474EA597, when opening a page like:https://translations.edge.launchpad.net/ubuntu/karmic/+source/fast-user-switch-applet/+pots/fast-user-switch-applet an AttributeError: 'POTemplateSubset' object has no attribute 'owner' is raised

Note that the page won't oops if the logged in user is a rosetta admin (e.g. Henning tried to open the page and it opened successfully)

Related branches

description: updated
Changed in rosetta:
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Henning Eggers (henninge)
milestone: none → 10.01
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Actually that oops is on a +translate page. We're clearly doing an EditByOwnersOrAdmins check on a POTemplateSubset, and a POTemplateSubset has no owner. I don't know why the check isn't looking at POFile instead.

Being a translations admin must bypass the broken check.

Revision history for this message
Henning Eggers (henninge) wrote :

Well, the fact that EditPOTemplateSubset call EditByOwnersOrAdmins.checkAuthenticated at all shows that it's broken. I think for a fairly quick fix, id simply change that to check for admins only. We'd have to dig deeper to find out what was meant to happen here.

Revision history for this message
Henning Eggers (henninge) wrote :

Adi,
I just saw that you introduced this checker. Let's talk about it next week to see what is really going wrong here.

Revision history for this message
Hein Mück (heinmueck) wrote :

I just confirmed that this only happens on edge. On production I get a "Lost something" page. Lowering the priority to High.

Revision history for this message
Henning Eggers (henninge) wrote :

That was my unprivileged alter ego speaking ... ;-) I noticed when I tried to change the importance.

Changed in rosetta:
importance: Critical → High
Changed in rosetta:
status: Triaged → In Progress
Revision history for this message
Adi Roiban (adiroiban) wrote :

The check was added as an attempt to fix bug 340662 .

Revision history for this message
Данило Шеган (danilo) wrote :

I don't understand exactly why was it necessary to introduce a new privilege for this? What was exactly wrong with the existing one? Bug 340662 was supposed to be only about introducing a more wider set of fields, and not changing *who* can get to them. For the fix, I'd mostly back out the change from 340662 except for adding new fields.

Revision history for this message
Adi Roiban (adiroiban) wrote :

I tried to explain the changes here: https://bugs.edge.launchpad.net/rosetta/+bug/340662/comments/5

My rationale for changing the current permission system was that if we allow a person to disable a template, we should also allow to enable it back. We also had this bug for Ubuntu translation coordinators and with the current code this is not possible.

Maybe we can change the code so that both enabled and disable template will use IPOTemplate.

Changed in rosetta:
assignee: Henning Eggers (henninge) → Adi Roiban (adiroiban)
Adi Roiban (adiroiban)
Changed in rosetta:
status: In Progress → Fix Committed
tags: added: qa-needstesting
Adi Roiban (adiroiban)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in rosetta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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