launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28168
[Merge] ~lgp171188/launchpad:fix-person-merge-job-permission-cve-discoverer into launchpad:master
Guruprasad has proposed merging ~lgp171188/launchpad:fix-person-merge-job-permission-cve-discoverer into launchpad:master.
Commit message:
Allow person-merge-job to SELECT, UPDATE the Cve table
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/416096
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:fix-person-merge-job-permission-cve-discoverer into launchpad:master.
diff --git a/database/schema/patch-2210-43-0.sql b/database/schema/patch-2210-43-0.sql
new file mode 100644
index 0000000..b51d2fa
--- /dev/null
+++ b/database/schema/patch-2210-43-0.sql
@@ -0,0 +1,19 @@
+-- Copyright 2022 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE Cve
+ ADD COLUMN date_made_public timestamp without time zone,
+ ADD COLUMN discoverer integer REFERENCES Person,
+ ADD COLUMN cvss jsonb;
+
+COMMENT ON COLUMN Cve.date_made_public IS 'The date on which the CVE was made public.';
+
+COMMENT ON COLUMN Cve.discoverer IS 'The person who discovered this CVE.';
+
+COMMENT ON COLUMN Cve.cvss IS 'The CVSS score for this CVE.';
+
+CREATE INDEX cve__discoverer__idx ON Cve (discoverer);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 43, 0);
diff --git a/database/schema/security.cfg b/database/schema/security.cfg
index 6199540..69dfec9 100644
--- a/database/schema/security.cfg
+++ b/database/schema/security.cfg
@@ -2350,6 +2350,7 @@ public.codereviewinlinecommentdraft = SELECT, UPDATE, DELETE
public.codereviewvote = SELECT, UPDATE
public.commercialsubscription = SELECT, UPDATE
public.customlanguagecode = SELECT
+public.cve = SELECT, UPDATE
public.distribution = SELECT, UPDATE
public.distributionsourcepackage = SELECT, INSERT, UPDATE, DELETE
public.distributionmirror = SELECT, UPDATE