Code review comment for lp:~abentley/launchpad/build-from-recipe-api

Revision history for this message
Tim Penhey (thumper) wrote :

The exported registrant and owner in the interface need to be slightly
more constrained. Looking at the IBranch interface, it seems that
'PublicPersonChoice' is the better choice for the registrant rather than just
Reference. I recall there being a big hoo-ha over it when we initially had
some privacy issues around person.

    registrant = exported(
        PublicPersonChoice(
            title=_("The person who created this recipe."),
            required=True, readonly=True,
            vocabulary='ValidPersonOrTeam'))

And similarly, the owner should be constrained to the person or a team the
person is a member of, otherwise someone would be able to pass off the recipe
to anyone else (which we don't support elsewhere).

    owner = exported(
        ParticipatingPersonChoice(
            title=_('Owner'),
            required=True, readonly=False,
            vocabulary='UserTeamsParticipationPlusSelf',
            description=_("The person or team who can edit this recipe.")))

In the operation_parameters for requestBuild you have pocket one space
dedented from the others.

lib/lp/registry/interfaces/person.py
 - You need a blank line between the end of createRecipe and getRecipe.

review: Needs Fixing

« Back to merge proposal