Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-18-2020 04:54 AM
I wrote a user defined function, which basically looks like this:
@Context
public Transaction tx;
@UserFunction
public Node createNode(@Name("labelName") String name) {
Node newNode = tx.createNode(Label.label(name));
return newNode;
}
After compiling to jar file, deploying it and running the createNode-function in the browser of Neo4j Desktop I get the following error:
Neo.ClientError.Security.Forbidden
'create_label' operations are not allowed for user 'neo4j' with roles [admin] restricted to READ.
When I create a new node through Cypher it all works fine. Should i change my settings somewhere?
04-18-2020 05:47 AM
User defined function are not allowed to perform any writes. You have to use a stored procedure instead.
All the sessions of the conference are now available online