Add default CVE allowlist to project library (#13770)

fixes #12700

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang 2020-12-16 14:20:56 +08:00 committed by GitHub
parent 3b04d2f8f5
commit b0c8cadad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,16 @@
/*
Fixes issue https://github.com/goharbor/harbor/issues/13317
Ensure the role_id of maintainer is 4 and the role_id of limisted guest is 5
Ensure the role_id of maintainer is 4 and the role_id of limited guest is 5
*/
UPDATE role SET role_id=4 WHERE name='maintainer' AND role_id!=4;
UPDATE role SET role_id=5 WHERE name='limitedGuest' AND role_id!=5;
/*
Fixes issue https://github.com/goharbor/harbor/issues/12700
Add the empty CVE allowlist to project library.
*/
INSERT INTO cve_allowlist (project_id, items) SELECT 1, '[]' WHERE NOT EXISTS (SELECT id FROM cve_allowlist WHERE project_id=1);
/*
Clean the dirty data in quota/quota_usage
Remove quota/quota_usage when the referenced project not exists