Repository navigation
fix(cve5): allow hiding the CVE Services login hint - #311
Open
Anurag-S1ngh wants to merge 1 commit into
Open
Anurag-S1ngh wants to merge 1 commit into
Anurag-S1ngh wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
hidePortalLoginHintsection option clears the comparison box instead, and an empty box is not rendered.Changes
views/edit.pug: exposehidePortalLoginHintas 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: enablehidePortalLoginHint.custom/cve5/style_overrides.css: hide#unSavedChangeswhile it is empty.Sections that do not set the option keep the current hint.
Testing
var hidePortalLoginHint = true;is emitted and the empty-box rule is present.node --check default/cve5/portal.jsand template compilation pass.VULNOGRAM_TLS_CERT=unittest/cert.pem VULNOGRAM_TLS_KEY=unittest/key.pem npm run unittestpasses.Closes #209