-
Notifications
You must be signed in to change notification settings - Fork 364
Add support for browser.retain_editor_history setting #1419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for browser.retain_editor_history setting #1419
Conversation
also change local defaults for community edition
| 'browser.remote_content_hostname_allowlist': 'guides.neo4j.com, localhost', | ||
| 'browser.retain_connection_credentials': false | ||
| 'browser.retain_connection_credentials': false, | ||
| 'browser.retain_editor_history': false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to default this to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As that's the current behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that the !isEnterprise stuff defaults to true since edition default/before connect is null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's better to explicitly look for "community" rather than not enterprise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server does default this setting to true, but for safety it was decided to default to false on the client side.
The settings are only ever loaded after initial discovery is done, so by that point we know the version/edition.
Also, only enterprise supports the setting, so that's why I decided to code it as "not enterprise"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Canny and Sentry both check allow shouldAllowOutgoing connections before connecting
misc code cleanup
| * Helpers | ||
| */ | ||
|
|
||
| export const VERSION_FOR_EDITOR_HISTORY_SETTING = '4.3.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be exported
| isEnterprise(state) && versionHasEditorHistorySetting(getVersion(state)) | ||
|
|
||
| export const shouldAllowOutgoingConnections = (state: any) => | ||
| !isEnterprise(state) || getAllowOutgoingConnections(state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would send outgoing connections before we connect to a database? I think that's a no-go in airgapped deployments
| export const shouldRetainConnectionCredentials = (state: any) => | ||
| !isEnterprise(state) || getRetainConnectionCredentials(state) | ||
|
|
||
| export const shouldRetainEditorHistory = (state: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a nit but could we move this to by be the other history getters? (so to line 146). Feel free to disregard this comment, just find it slightly more readable
OskarDamkjaer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I the current impl would do outgoing connections before connecting
also misc code cleanup
OskarDamkjaer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be more places where we want to check hasEdition before checking isEnterprise in the future, this looks good for the release
also change local defaults for community edition