Code review comment for lp:~adiroiban/launchpad/bug-406477

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

= Bug 406477 =

Members of the ubuntu-translations-coordinators team can edit templates through the +admin pages.

However, once a template has been disabled, the +admin page is no longer accessible to them, which stops them from e.g. enabling the template again in case of a mistake.

== Implementation details ==

After asking a pre-implementation review from Danilo, he suggest I should use launchpad.TranslationsAdmin, instead of the more generic launchpad.Admin translation.

The previous administration privileges for IPOTemplate was assigned only to RosettaAdmins.
Now it was change to all RosettaAdmin + owner of distro.translationgroup

== Tests ==

There were no test covering the use case of distribution translations coordinator admin rights to templates, so this was added to distroseries-templates

Also the previous rosetta-potemplate-index was not checking the administrative links.

./bin/test -ct "distroseries-templates"
./bin/test -ct "rosetta-potemplate-index"

== Demo and Q/A ==

Make sure you are a member of Ubuntu Translation Coordinators team (ubuntu-l10n-coordinator).
https://launchpad.dev/~ubuntu-l10n-coordinator

Go to the Distro +template page
https://translations.launchpad.dev/ubuntu/hoary/+templates

You should see the Administer page for Evolution, disabled-template .

As a member of Ubuntu Translation Coordinators team you should be able to administer it, just like any other template from that table.

Login as a normal user, you should not see the administration links (only Download), and when trying to manually enter the admin url (https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/disabled-template/+admin) you should see an access denied page.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/security.py
  lib/lp/translations/browser/configure.zcml
  lib/lp/translations/browser/potemplate.py
  lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt
  lib/lp/translations/stories/standalone/xx-rosetta-potemplate-index.txt
  lib/lp/translations/templates/object-templates.pt
  lib/lp/translations/templates/potemplate-index.pt

« Back to merge proposal