← Back to team overview

launchpad-dev team mailing list archive

Re: [RFC] Bug #347768: Allow anyone with upload rights to write to a package branch.

 

On Wed, Jul 22, 2009 at 10:36:51PM -0300, Celso Providelo wrote:
> >>   Bjorn says, "What I'm looking for is something like ISourcePackage, or
> >>   maybe even IDistributionSourcePackage. Maybe they should be extended to
> >>   know which archive they belong to."
> >>
> >
> > And also:
> >  * How do pockets fit into this?
> 
> We have an extra decision point on IDistroSeries.canUploadToPocket(pocket)
> 
> I will need some time to think about a plan and will be replying your
> original RFC soon.
> 
> I think we should got towards check_permission('launchpad.Append',
> ArchiveSourcePackage) with ASP == (Archive, PocketSP) ...

Wow, this is exactly what I was going to say -- asking check_permission
on the SourcePackage is actually "wrong" in most contexts (unless you
really know what you are doing) so you should be asking on an object
which embodies what you are asking. Maybe SourcePackage should have a
method (or should be adaptable) to SourcePackageInAnArchive which you
could then use for a realistic permission check -- taking account the
package's current component and pocket information. But I think you'd
also need to know the distribution series..
-- 
Christian Robottom Reis | [+55 16] 3376 0125 | http://launchpad.net/~kiko
                        | [+55 16] 9112 6430 | http://async.com.br/~kiko



References