+class AnonymousAuthorization(AuthorizationBase):
+ """Allow any authenticated and unauthenticated user access."""
+ permission = 'launchpad.View'
+
+ def checkUnauthenticated(self):
+ """Any unauthorized user can see this object."""
+ return True
+
+ def checkAuthenticated(self, user):
+ """Any authorized user can see this object."""
+ return True
+
+
class AdminByAdminsTeam(AuthorizationBase):
permission = 'launchpad.Admin'
usedfor = Interface
@@ -815,24 +828,9 @@ user.in_admin)
=== modified file 'lib/canonical/ launchpad/ security. py' launchpad/ security. py 2010-02-04 22:39:09 +0000 launchpad/ security. py 2010-02-04 23:14:01 +0000
--- lib/canonical/
+++ lib/canonical/
@@ -172,6 +172,19 @@
return True
+class AnonymousAuthor ization( AuthorizationBa se): cated(self) : ted(self, user): am(Authorizatio nBase):
user. in_admin)
+ """Allow any authenticated and unauthenticated user access."""
+ permission = 'launchpad.View'
+
+ def checkUnauthenti
+ """Any unauthorized user can see this object."""
+ return True
+
+ def checkAuthentica
+ """Any authorized user can see this object."""
+ return True
+
+
class AdminByAdminsTe
permission = 'launchpad.Admin'
usedfor = Interface
@@ -815,24 +828,9 @@
-class ViewProductSeri es(Authorizatio nBase): es(AnonymousAut horization) :
+class ViewProductSeri
usedfor = IProductSeries cated(self) : .checkUnauthent icated` . ted(self, user): .checkAuthentic ated`.
- permission = 'launchpad.View'
-
- def checkUnauthenti
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
-
- def checkAuthentica
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
class EditProductSeri es(EditByOwners OrAdmins) :
@@ -980,44 +978,14 @@
self, bugattachment.bug)
-class ViewBugSubscrip tion(Authorizat ionBase) : tion(AnonymousA uthorization) :
+class ViewBugSubscrip
usedfor = IBugSubscription cated(self) : .checkUnauthent icated` . ted(self, user): .checkAuthentic ated`. AuthorizationBa se): AnonymousAuthor ization) :
- permission = 'launchpad.View'
-
- def checkUnauthenti
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
-
- def checkAuthentica
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
-
-
-class ViewBugMessage(
+
+
+class ViewBugMessage(
usedfor = IMessage cated(self) : .checkUnauthent icated` . ted(self, user): .checkAuthentic ated`.
- permission = 'launchpad.View'
-
- def checkUnauthenti
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
-
- def checkAuthentica
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
class ViewAnnouncemen t(Authorization Base):
@@ -1323,24 +1291,9 @@
self, user)
-class ViewProductRele ase(Authorizati onBase) : ase(AnonymousAu thorization) :
+class ViewProductRele
usedfor = IProductRelease cated(self) : .checkUnauthent icated` . ted(self, user): .checkAuthentic ated`.
- permission = 'launchpad.View'
-
- def checkUnauthenti
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
-
- def checkAuthentica
- """See `IAuthorization
-
- :return: True or False.
- """
- return True
class AdminTranslatio nImportQueueEnt ry(Authorizatio nBase):