# Please keep AdminPOTemplateSubset in sync with this, unless you
@@ -1155,8 +1155,7 @@ distribution = template.distroseries.distribution
return ( AdminDistributionTranslations(
- template.distroseries.distribution).checkAuthenticated(
- user))
+ distribution).checkAuthenticated(user))
else:
# Template is on a product.
@@ -1663,16 +1662,13 @@
def checkAuthenticated(self, user): template_set = self.obj
if template_set.distroseries is not None:
- distro = template_set.distroseries.distribution
- translation_group = distro.translationgroup
- if translation_group and user.inTeam(translation_group.owner):
- return True
-
+ distribution = template_set.distroseries.distribution
return ( AdminDistributionTranslations(
- template_set.distroseries.distribution).checkAuthenticated(user))
-
- return False
+ distribution).checkAuthenticated(user))
+ else:
+ # Template is on a product.
+ return OnlyRosettaExpertsAndAdmins.checkAuthenticated(self, user)
class AdminDistroSeriesLanguage(OnlyRosettaExpertsAndAdmins):
=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-admin.txt'
--- lib/lp/translations/stories/standalone/xx-potemplate-admin.txt 2009-08-12 05:09:36 +0000
+++ lib/lp/translations/stories/standalone/xx-potemplate-admin.txt 2009-12-11 11:33:39 +0000
@@ -1,3 +1,10 @@
+Administering POTemplates
+=========================
+
+
+Product templates
+-----------------
+
The POTemplate admin page lets us to edit any aspect of that object, that's
why we need to be a Rosetta Expert or a Launchpad admin to use it.
Many thanks for the review... there we a couple of stupid errors :(
For the future I will try to read the whole diff at least twice.
Latest diff.
=== modified file 'lib/canonical/ launchpad/ icing/style- 3-0.css' launchpad/ icing/style- 3-0.css 2009-12-10 12:46:11 +0000 launchpad/ icing/style- 3-0.css 2009-12-11 11:33:39 +0000
--- lib/canonical/
+++ lib/canonical/
@@ -682,7 +682,8 @@
*/
.inactive-template td {
- background-color: #DCDCDC;
+ background-color: #fee;
+ color: #855;
}
=== modified file 'lib/canonical/ launchpad/ security. py' launchpad/ security. py 2009-12-10 12:46:11 +0000 launchpad/ security. py 2009-12-11 11:33:39 +0000 rtsAndAdmins. checkAuthentica ted(self, user) or nByDistroOwners OrAdmins. checkAuthentica ted( rtsAndAdmins. checkAuthentica ted(self, user) or nByDistroOwners OrAdmins. checkAuthentica ted(
--- lib/canonical/
+++ lib/canonical/
@@ -1130,9 +1130,9 @@
return True
else:
return (
- OnlyRosettaExpe
- EditDistributio
- self, user))
+ OnlyRosettaExpe
+ EditDistributio
+ self, user))
# Please keep AdminPOTemplate Subset in sync with this, unless you
distribut ion = template. distroseries. distribution
AdminDistrib utionTranslatio ns( distroseries. distribution) .checkAuthentic ated( .checkAuthentic ated(user) )
@@ -1155,8 +1155,7 @@
return (
- template.
- user))
+ distribution)
else: ted(self, user):
template_ set = self.obj set.distroserie s is not None: set.distroserie s.distribution translationgrou p translation_ group.owner) : set.distroserie s.distribution
AdminDistrib utionTranslatio ns( set.distroserie s.distribution) .checkAuthentic ated(user) ) .checkAuthentic ated(user) ) rtsAndAdmins. checkAuthentica ted(self, user)
# Template is on a product.
@@ -1663,16 +1662,13 @@
def checkAuthentica
if template_
- distro = template_
- translation_group = distro.
- if translation_group and user.inTeam(
- return True
-
+ distribution = template_
return (
- template_
-
- return False
+ distribution)
+ else:
+ # Template is on a product.
+ return OnlyRosettaExpe
class AdminDistroSeri esLanguage( OnlyRosettaExpe rtsAndAdmins) :
=== modified file 'lib/lp/ translations/ stories/ standalone/ xx-potemplate- admin.txt' translations/ stories/ standalone/ xx-potemplate- admin.txt 2009-08-12 05:09:36 +0000 translations/ stories/ standalone/ xx-potemplate- admin.txt 2009-12-11 11:33:39 +0000 ======= ======= =====
--- lib/lp/
+++ lib/lp/
@@ -1,3 +1,10 @@
+Administering POTemplates
+======
+
+
+Product templates
+-----------------
+
The POTemplate admin page lets us to edit any aspect of that object, that's
why we need to be a Rosetta Expert or a Launchpad admin to use it.
@@ -155,8 +162,29 @@ translations. launchpad. dev/evolution/ trunk/+ pots/evolution- renamed
>>> print admin_browser.url
http://
- translations. launchpad. dev/evolution/ trunk/+ pots/' renamed/ +admin' ) getControl( name='field. iscurrent' ).value = False getControl( 'Change' ).click( ) translations. launchpad. dev/evolution/ trunk/+ pots/evolution- renamed translations. launchpad. dev/evolution/ trunk/+ pots/' renamed/ +admin' ) getControl( name='field. iscurrent' ).value = True getControl( 'Change' ).click( ) translations. launchpad. dev/evolution/ trunk/+ pots/evolution- renamed ------- ------- --
-== Distribution templates ==
+Administrators can disable and then make changes to a disabled template.
+
+ >>> admin_browser.open(
+ ... 'http://
+ ... 'evolution-
+ >>> admin_browser.
+ >>> admin_browser.
+ >>> print admin_browser.url
+ http://
+
+Now we will reenable the template.
+
+ >>> admin_browser.open(
+ ... 'http://
+ ... 'evolution-
+ >>> admin_browser.
+ >>> admin_browser.
+ >>> print admin_browser.url
+ http://
+
+
+Distribution templates
+------
Distributions get slightly wider permissions to manage their templates
autonomously.
@@ -214,3 +242,15 @@
>>> print template.path browser. open(template_ admin_url) browser. getControl( name='field. iscurrent' ).value = False browser. getControl( 'Change' ).click( ) browser. open(template_ admin_url) browser. getControl( name='field. iscurrent' ).value = True browser. getControl( 'Change' ).click( )
splat.pot
+
+Distribution translation coordinators can disable and manage disabled
+templates.
+
+ >>> group_owner_
+ >>> group_owner_
+ >>> group_owner_
+ >>> group_owner_
+ >>> group_owner_
+ >>> group_owner_
+
+