launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07869
Re: Chaining security adapters
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11-09-06 08:32 AM, Brad Crittenden wrote:
> To remove the hard-coded names and facilitate this pattern of
> forwarding via lookup I created a new base class called
> ForwardedAuthorization.
This sounds a lot like the DerivedAuthorization class. Have you seen
that? The difference is that DerivedAuthorization can consider
multiple sub-objects to determine authorization. It is used by
ViewSourcePackageRecipe, for example:
class ViewSourcePackageRecipe(DerivedAuthorization):
permission = "launchpad.View"
usedfor = ISourcePackageRecipe
def iter_objects(self):
return self.obj.getReferencedBranches()
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5mOssACgkQ0F+nu1YWqI0FWgCdEzuW1Hqc+u8/HDgwduIHZkP5
hMwAmgMt73lGe2zSg6DJHGunSZk1VVn+
=ABIR
-----END PGP SIGNATURE-----
Follow ups
References