Skip to content

fix(cve5): allow hiding the CVE Services login hint - #311

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/209-hide-portal-login-hint
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/209-hide-portal-login-hint

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown

Summary

The Changes tab shows "Login to CVE Services to compare against the current record" when the browser has no CVE Services session. ASF users do not use that session, so the message is always there and does not lead anywhere.

A hidePortalLoginHint section option clears the comparison box instead, and an empty box is not rendered.

Changes

  • views/edit.pug: expose hidePortalLoginHint as a browser global from the section config.
  • default/cve5/portal.js: clear the box instead of showing the login hint when the option is set.
  • custom/cve5/conf.js: enable hidePortalLoginHint.
  • custom/cve5/style_overrides.css: hide #unSavedChanges while it is empty.

Sections that do not set the option keep the current hint.

Testing

  • Rendered the editor with the preview renderer: var hidePortalLoginHint = true; is emitted and the empty-box rule is present.
  • node --check default/cve5/portal.js and template compilation pass.
  • VULNOGRAM_TLS_CERT=unittest/cert.pem VULNOGRAM_TLS_KEY=unittest/key.pem npm run unittest passes.

Closes #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove "Login to CVE Services to compare against the current record" on history page

1 participant