feat: Enhance RemoteServer and Console create-user to assign group#1405
Merged
Conversation
robfrank
reviewed
Dec 28, 2023
|
|
||
| final String password; | ||
| final List<String> databases; | ||
| HashMap<String,String> databases = new HashMap<String,String>(); |
Collaborator
There was a problem hiding this comment.
my suggestion:
final Map<String,String>...
robfrank
reviewed
Dec 28, 2023
| } | ||
|
|
||
| public void createUser(final String userName, final String password, final List<String> databases) { | ||
| public void createUser(final String userName, final String password, final HashMap<String,String> databases) { |
Collaborator
There was a problem hiding this comment.
again, prefer interface:
final Map<String,String
robfrank
reviewed
Dec 28, 2023
|
|
||
| public void createUser(final String userName, final String password, final List<String> databases) { | ||
|
|
||
| HashMap<String,String> databasesWithGroups = new HashMap<String, String>(); |
Collaborator
There was a problem hiding this comment.
again:
Map<String,String> databasesWithGroups = new HashMap<String, String>();
Member
|
Good for me ;-) |
mergify Bot
added a commit
that referenced
this pull request
Jun 7, 2026
Bumps [neo4j-driver](https://github.com/neo4j/neo4j-javascript-driver) from 6.0.1 to 6.1.0. Release notes *Sourced from [neo4j-driver's releases](https://github.com/neo4j/neo4j-javascript-driver/releases).* > v6.1.0 > ------ > > Introduces the full, stabilized version of Object Mapping, as well as very simple retries that should make `Session.run()` handle rate-limiting on Aura more gracefully. Alongside a number of minor fixes. > > #### ⭐ New Features > > --- > > * Stabilized Record Object Mapping and introduced Parameter Object Mapping. [#1362](https://github.com/neo4j/neo4j-javascript-driver/pull/1362) [#1407](https://github.com/neo4j/neo4j-javascript-driver/pull/1407) NOTE: A usage guide can be found in the PR description on [#1407](https://github.com/neo4j/neo4j-javascript-driver/pull/1407) > * Add single-shot retry for Idempotent errors on `Session.run()`, these will currently only trigger on errors caused by Aura rate-limiting. [#1404](https://github.com/neo4j/neo4j-javascript-driver/pull/1404) > > #### 🔧 Fixes > > --- > > * Correct TypeScript exports for Record Object Mapping. [#1359](https://github.com/neo4j/neo4j-javascript-driver/pull/1359) > * Improve error message for starting work on a busy session. [#1363](https://github.com/neo4j/neo4j-javascript-driver/pull/1363) > * Fix error handling for unexpected errors in Authentication Provider. [#1366](https://github.com/neo4j/neo4j-javascript-driver/pull/1366) > * Fix issue causing SNI deprecation warnings when correcting to an IP. [#1369](https://github.com/neo4j/neo4j-javascript-driver/pull/1369) > * Eagerly send discard on close if connection is waiting to pull more, solves issue related to corner-case missuse that could make the driver release an unclean connection to the pool. [#1403](https://github.com/neo4j/neo4j-javascript-driver/pull/1403) > * Do not mark Result as consumed when `Result.keys()` is awaited. [#1402](https://github.com/neo4j/neo4j-javascript-driver/pull/1402) > > #### 🧹 Housekeeping > > --- > > * Improve `Session.run()` docs with warnings on the auto-commit nature of the function. [#1389](https://github.com/neo4j/neo4j-javascript-driver/pull/1389) [#1390](https://github.com/neo4j/neo4j-javascript-driver/pull/1390) > * Update docs reference to dbms.setTXMetaData which is renamed to tx.setMetaData.[#1408](https://github.com/neo4j/neo4j-javascript-driver/pull/1408) Commits * [`81f7d82`](neo4j/neo4j-javascript-driver@81f7d82) bump deno to 6.1.0 ([#1421](https://github.com/neo4j/neo4j-javascript-driver/issues/1421)) * [`a06109c`](neo4j/neo4j-javascript-driver@a06109c) Pre-release changes to Object Mapping ([#1407](https://github.com/neo4j/neo4j-javascript-driver/issues/1407)) * [`2595d67`](neo4j/neo4j-javascript-driver@2595d67) Update docs reference to dbms.setTXMetaData ([#1408](https://github.com/neo4j/neo4j-javascript-driver/issues/1408)) * [`18c681a`](neo4j/neo4j-javascript-driver@18c681a) Result.close() send discard directly if waiting for more ([#1403](https://github.com/neo4j/neo4j-javascript-driver/issues/1403)) * [`a98f9c5`](neo4j/neo4j-javascript-driver@a98f9c5) Add retries for idempotent errors on Session.run() ([#1404](https://github.com/neo4j/neo4j-javascript-driver/issues/1404)) * [`d884171`](neo4j/neo4j-javascript-driver@d884171) Development Dependency updates and tightening security ([#1405](https://github.com/neo4j/neo4j-javascript-driver/issues/1405)) * [`6714eba`](neo4j/neo4j-javascript-driver@6714eba) Fix error piping in gulpfile ([#1406](https://github.com/neo4j/neo4j-javascript-driver/issues/1406)) * [`2caa88a`](neo4j/neo4j-javascript-driver@2caa88a) Expand Record Object Mapping to allow Parameter Mapping ([#1362](https://github.com/neo4j/neo4j-javascript-driver/issues/1362)) * [`6357e65`](neo4j/neo4j-javascript-driver@6357e65) do not add "onCompleted" on keys observer ([#1402](https://github.com/neo4j/neo4j-javascript-driver/issues/1402)) * [`1ec186a`](neo4j/neo4j-javascript-driver@1ec186a) TestKit backend: fix BigInt serialization ([#1397](https://github.com/neo4j/neo4j-javascript-driver/issues/1397)) * Additional commits viewable in [compare view](neo4j/neo4j-javascript-driver@6.0.1...6.1.0) Install script changes This version modifies `prepare` script that runs during installation. Review the package contents before updating. [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.
What does this PR do?
RemoteServeclass methodcreateUseris overloaded with a variant with the signatureAs for the HTTP API server command the
databasesHashMap should have keys being database names and values being a group name.The former function with a
List<String>databasesargument is still available, but its body changed so that the new method is called by it.Consoleclass methodexecuteCreateUseris updated so the newRemoteServercreateUsermethod is used. However not too robustly, and error handling is defered to theRemoteServeror eventually to theServerSecurityUserclass.So now in console the following can be done:
Motivation
Missing capability to assign group during user creation in console, even though possibl via HTTP API.
Additional Notes
It is possible to pass an empty group, but AFAIK this is also allowed in the HTTP server command.
Checklist
mvn clean packagecommand