← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~enriqueesanchz/launchpad:add-metadata-cve-model into launchpad:master

 

Not used to this zope/lazr things but that is what I've found

Diff comments:

> diff --git a/lib/lp/bugs/interfaces/cve.py b/lib/lp/bugs/interfaces/cve.py
> index 4efd60c..7f50341 100644
> --- a/lib/lp/bugs/interfaces/cve.py
> +++ b/lib/lp/bugs/interfaces/cve.py
> @@ -180,6 +180,18 @@ class ICve(Interface):
>          as_of="devel",
>      )
>  
> +    metadata = exported(
> +        Dict(
> +            title=_("metadata"),
> +            description=_("CVE metadata."),
> +            key_type=Text(),
> +            value_type=Text(),
> +            required=False,
> +            readonly=False,

making it readonly will make us not able to modify the existing cves right? Afaik, it will only let you set it when creating the object. Users won't be able to modify it if we don't let them do it through UI/API.

CVSS is readonly because it enforces to use the setCVSSVectorForAuthority() method, but as you can see, description is `readonly=False`.

The only possible way to do what you said is to create a `setMetadata` or `setAffected` method what I find not worth it.

> +        ),
> +        as_of="devel",
> +    )
> +
>      def createReference(source, content, url=None):
>          """Create a new CveReference for this CVE."""
>  


-- 
https://code.launchpad.net/~enriqueesanchz/launchpad/+git/launchpad/+merge/493451
Your team Launchpad code reviewers is requested to review the proposed merge of ~enriqueesanchz/launchpad:add-metadata-cve-model into launchpad:master.



References