magic InformationType numbers in access grant related DB procedures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Invalid
|
Low
|
Unassigned |
Bug Description
Running 'grep "3, 4, 5" *' in database/schema returns these hits:
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
patch-2209-
ISTM that this is already outdated: The enum InformationType defines
another non-public type EMBARGOED, represented as the number 6.
We should
- define a DB procedure which returns the numbers for private values in
InformationType,
- use this procedure in the other DB procedures instead of simply
specifying the numbers themselves
- add a unit test which checks that this procedure returns the same
numbers as those appearing in lp.registry.
I also think that the procdures should be more thoroughly checked for
the usage of these numbers -- grepping for "3, 4, 5" may of course miss
some places where information_type values are checked.
And it might make sense to replace "information_type IN <all-private-
with "NOT information_type IN <all-public-
description: | updated |
tags: | added: disclosure information-type |
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → Low |
These patch migrate production data. They are used in production once, so they are correct for the day they were run. These files will be removed from the tree when the db is incremented from the next major revision. I do not think this issue is any different from membership types, bug statues, and archive types, all of which have changed over the years.