def checkAuthenticated(self, user):
"""Is the user a privileged team member or Launchpad staff?
-
+
Return true when the user is a member of Launchpad admins,
registry experts, team admins, or the team owners.
"""
@@ -1431,7 +1432,6 @@
# This code MUST match the logic in IBuildSet.getBuildsForBuilder()
# otherwise users are likely to get 403 errors, or worse.
-
def checkAuthenticated(self, user):
"""Private restricts to admins and archive members."""
if not self.obj.archive.private:
=== modified file 'lib/lp/translations/browser/potemplate.py'
--- lib/lp/translations/browser/potemplate.py 2010-01-20 20:16:29 +0000
+++ lib/lp/translations/browser/potemplate.py 2010-01-20 20:33:54 +0000
@@ -533,9 +533,8 @@
# We only change date_last_updated when the translation_domain
# field is changed because it is the only relevant field we
# care about regarding the date of last update.
- UTC = pytz.timezone('UTC') naked_context = removeSecurityProxy(context)
- naked_context.date_last_updated = datetime.datetime.now(UTC)
+ naked_context.date_last_updated = datetime.datetime.now(pytz.UTC)
Here is the diff after running the syntactic check for modified files.
=== modified file 'lib/canonical/ launchpad/ security. py' launchpad/ security. py 2010-01-18 16:54:07 +0000 launchpad/ security. py 2010-01-20 20:29:00 +0000 self.obj. person) or
user. isOneOf(
self.obj. specification,
user. in_admin)
--- lib/canonical/
+++ lib/canonical/
@@ -469,7 +469,7 @@
return (user.inTeam(
- ['owner','drafter', 'assignee', 'approver']) or
+ ['owner', 'drafter', 'assignee', 'approver']) or
@@ -530,6 +530,7 @@ self.obj. target)
return True
return user.isOwner(
+ yLaunchpadAdmin s(Authorization Base):
class AdminMilestoneB
permission = 'launchpad.Admin'
usedfor = IMilestone
@@ -574,7 +575,7 @@
def checkAuthentica ted(self, user):
"""Is the user a privileged team member or Launchpad staff?
-
+
Return true when the user is a member of Launchpad admins,
registry experts, team admins, or the team owners.
"""
@@ -1431,7 +1432,6 @@
# This code MUST match the logic in IBuildSet. getBuildsForBui lder() ted(self, user): archive. private:
# otherwise users are likely to get 403 errors, or worse.
-
def checkAuthentica
"""Private restricts to admins and archive members."""
if not self.obj.
=== modified file 'lib/lp/ translations/ browser/ configure. zcml' translations/ browser/ configure. zcml 2009-12-12 05:47:41 +0000 translations/ browser/ configure. zcml 2010-01-20 20:31:52 +0000
< browser: page
name= "+chart"
template= "../templates/ potemplate- chart.pt" />
< browser: page
name= "+portlet- details"
template= "../templates/ potemplate- portlet- details. pt"/>
--- lib/lp/
+++ lib/lp/
@@ -391,9 +391,9 @@
-
+
<!-- Potemplate Portlets -->
-
+
=== modified file 'lib/lp/ translations/ browser/ potemplate. py' translations/ browser/ potemplate. py 2010-01-20 20:16:29 +0000 translations/ browser/ potemplate. py 2010-01-20 20:33:54 +0000 'UTC')
naked_ context = removeSecurityP roxy(context) date_last_ updated = datetime. datetime. now(UTC) date_last_ updated = datetime. datetime. now(pytz. UTC)
--- lib/lp/
+++ lib/lp/
@@ -533,9 +533,8 @@
# We only change date_last_updated when the translation_domain
# field is changed because it is the only relevant field we
# care about regarding the date of last update.
- UTC = pytz.timezone(
- naked_context.
+ naked_context.
@property
def cancel_url(self):
=== modified file 'lib/lp/ translations/ configure. zcml' translations/ configure. zcml 2010-01-17 02:07:16 +0000 translations/ configure. zcml 2010-01-20 20:32:41 +0000
< require
permission= "launchpad. TranslationsAdm in"
set_ attributes= "
sourcepackageve rsion binarypackagename languagepack
source_ file_format source_file date_last_updated
from_sourcepack agename header"/>
--- lib/lp/
+++ lib/lp/
@@ -415,7 +415,7 @@
- name productseries distroseries sourcepackagename
+ name productseries distroseries sourcepackagename
=== modified file 'lib/lp/ translations/ stories/ standalone/ xx-potemplate- edit.txt' translations/ stories/ standalone/ xx-potemplate- edit.txt 2010-01-20 20:16:29 +0000 translations/ stories/ standalone/ xx-potemplate- edit.txt 2010-01-20 20:32:18 +0000
--- lib/lp/
+++ lib/lp/
@@ -109,7 +109,7 @@
The visible fields can be changed and saved.
>>> browser. getControl( name='field. translation_ domain' ).value = u'evo' getControl( name='field. priority' ).value = '100' getControl( name='field. priority' ).value = '100' getControl( name='field. iscurrent' ).value = False getControl( name='field. path'). value = 'po/evolution.pot' getControl( name='field. owner') .value = u'name12' getControl( name='field. translation_ domain' ).value getControl( name='field. priority' ).value getControl( name='field. iscurrent' ).value getControl( name='field. path'). value
- >>> browser.
+ >>> browser.
>>> browser.
>>> browser.
>>> browser.
@@ -127,7 +127,7 @@
>>> browser.
'evo'
>>> browser.
- '100'
+ '100'
>>> browser.
False
>>> browser.