Code review comment for lp:~wgrant/launchpad/observer-db

Revision history for this message
William Grant (wgrant) wrote :

The schema has been revised significantly. Key changes:

 - AccessPolicy now has a type enum column (Private, Security, etc.) instead of names. This is hopefully sufficiently inflexible that people won't do stupid things, makes bug and branch retargeting easier, and makes the table smaller.
 - AccessPolicyArtifact.policy now exists, so AccessPolicyGrant.{policy,artifact} are mutually exclusive.
 - AccessPolicyGrant has gained grantor/date_created columns, because unauditable grants are bad.

Bug/Branch retain their FKs directly to AP, rather than just having a policy type and inferring the target from the object's context. Multi-task bugs make determining that context non-trivial, and we have to have the AP FK denormed onto APA anyway.

Public bugs can have any number of targets, so it's not really possible to link them to a particular policy in any meaningful way. This, along with performance concerns around the expense that would be imposed on queries for public bugs, lead me to not have an AccessPolicyType.PUBLIC, and hence no AccessPolicy for public artifacts.

« Back to merge proposal