launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06098
[Merge] lp:~nigelbabu/launchpad/logo-links-713873 into lp:launchpad
Nigel Babu has proposed merging lp:~nigelbabu/launchpad/logo-links-713873 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #713873 in Launchpad itself: "(in API) Person.logo_link is hard to use and performs poorly"
https://bugs.launchpad.net/launchpad/+bug/713873
For more details, see:
https://code.launchpad.net/~nigelbabu/launchpad/logo-links-713873/+merge/88631
Add a method to person to print the logo and mugshot urls directly
--
https://code.launchpad.net/~nigelbabu/launchpad/logo-links-713873/+merge/88631
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~nigelbabu/launchpad/logo-links-713873 into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py 2011-12-30 06:14:56 +0000
+++ lib/lp/registry/interfaces/person.py 2012-01-16 01:28:24 +0000
@@ -757,6 +757,22 @@
:return: a PPA `IArchive` record corresponding to the name.
"""
+ @export_read_operation()
+ @operation_for_version("beta")
+ def getLogoUrl():
+ """Return link to logo.
+
+ :return: The link to logo.
+ """
+
+ @export_read_operation()
+ @operation_for_version("beta")
+ def getMugshotUrl():
+ """Return link to mugshot.
+
+ :return: The link to mugshot.
+ """
+
class IPersonViewRestricted(IHasBranches, IHasSpecifications,
IHasMergeProposals, IHasMugshot,
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2012-01-12 08:13:59 +0000
+++ lib/lp/registry/model/person.py 2012-01-16 01:28:24 +0000
@@ -3055,6 +3055,14 @@
def canCreatePPA(self):
"""See `IPerson.`"""
return self.subscriptionpolicy in CLOSED_TEAM_POLICY
+
+ def getLogoUrl(self):
+ """See `IPerson.`"""
+ return self.logo
+
+ def getMugshotUrl(self):
+ """See `IPerson.`"""
+ return self.mugshot
class PersonSet:
Follow ups